Google App Engine 和 Google Compute Engine 有什么区别? [英] What is the difference between Google App Engine and Google Compute Engine?

查看:34
本文介绍了Google App Engine 和 Google Compute Engine 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 App Engine 和 App Engine 之间的区别是什么计算引擎是.谁能给我解释一下区别?

I was wondering what the difference between App Engine & Compute Engine are. Can anyone explain the difference to me?

推荐答案

App Engine 是一种平台即服务.这意味着您只需部署代码,平台就会为您完成其他所有工作.例如,如果您的应用非常成功,App Engine 将自动创建更多实例来处理增加的数量.

App Engine is a Platform-as-a-Service. It means that you simply deploy your code, and the platform does everything else for you. For example, if your app becomes very successful, App Engine will automatically create more instances to handle the increased volume.

详细了解 App Engine

Compute Engine 是一种基础架构即服务.您必须创建和配置自己的虚拟机实例.它为您提供了更大的灵活性,而且成本通常比 App Engine 低得多.缺点是您必须自己管理应用程序和虚拟机.

Compute Engine is an Infrastructure-as-a-Service. You have to create and configure your own virtual machine instances. It gives you more flexibility and generally costs much less than App Engine. The drawback is that you have to manage your app and virtual machines yourself.

详细了解 Compute Engine

如有必要,您可以混合使用 App Engine 和 Compute Engine.它们都可以与 Google Cloud Platform 的其他部分完美配合.

You can mix both App Engine and Compute Engine, if necessary. They both work well with the other parts of the Google Cloud Platform.

编辑(2016 年 5 月):

EDIT (May 2016):

一个更重要的区别:如果没有请求进入,在 App Engine 上运行的项目可以缩减到零个实例.这在开发阶段非常有用,因为您可以持续数周而不会超过慷慨的免费实例配额-小时.灵活的运行时(即托管虚拟机")至少需要一个实例才能持续运行.

One more important distinction: projects running on App Engine can scale down to zero instances if no requests are coming in. This is extremely useful at the development stage as you can go for weeks without going over the generous free quota of instance-hours. Flexible runtime (i.e. "managed VMs") require at least one instance to run constantly.

编辑(2017 年 4 月):

EDIT (April 2017):

Cloud Functions(目前处于测试阶段)在抽象方面比 App Engine 更上一层楼 - 没有实例!它允许开发人员部署响应不同事件(可能包括 HTTP 请求、云存储中的更改等)而执行的小段代码.

Cloud Functions (currently in beta) is the next level up from App Engine in terms of abstraction - no instances! It allows developers to deploy bite-size pieces of code that execute in response to different events, which may include HTTP requests, changes in Cloud Storage, etc.

与 App Engine 的最大区别在于函数按 100 毫秒定价,而 App Engine 的实例仅在 15 分钟不活动后关闭.另一个优点是 Cloud Functions 立即执行,而对 App Engine 的调用可能需要一个新实例 - 冷启动新实例可能需要几秒钟或更长时间(取决于运行时和您的代码).

The biggest difference with App Engine is that functions are priced per 100 milliseconds, while App Engine's instances shut down only after 15 minutes of inactivity. Another advantage is that Cloud Functions execute immediately, while a call to App Engine may require a new instance - and cold-starting a new instance may take a few seconds or longer (depending on runtime and your code).

这使 Cloud Functions 成为 (a) 罕见调用的理想选择 - 无需让实例保持活动状态以防万一发生,(b) 快速变化的负载,其中实例经常旋转和关闭,以及可能有更多用例.

This makes Cloud Functions ideal for (a) rare calls - no need to keep an instance live just in case something happens, (b) rapidly changing loads where instances are often spinning and shutting down, and possibly more use cases.

阅读有关云函数的更多信息

这篇关于Google App Engine 和 Google Compute Engine 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆