简体   繁体   English

在 App Engine 和 Compute Engine 中启动 docker 容器有什么区别?

[英]What's the difference between launching a docker container in App Engine vs Compute Engine?

Given that you can upload docker images to both the app engine and the Compute Engine, what's the real difference for a person that always contains their apps in docker?鉴于您可以将 docker 图像上传到应用程序引擎和计算引擎,对于始终将其应用程序包含在 docker 中的人来说,真正的区别是什么?

According to a similar question the difference boils down to PaaS vs IaaS, but with a docker file you always specify the OS and runtime environment.根据一个类似的问题,区别归结为 PaaS 与 IaaS,但是使用 docker 文件,您始终指定操作系统和运行时环境。 So the only difference I see is you might end up over specifying on App Engine by giving a container.所以我看到的唯一区别是您可能最终会通过提供容器在 App Engine 上过度指定。

Fundamentally, if you just want your app to scale seamlessly and quickly without much input, use App Engine Flex.从根本上说,如果您只是希望您的应用程序无需太多输入即可无缝且快速地扩展,请使用 App Engine Flex。 If you want more control that you can configure in different ways using other Google products, consider an unmanaged instance group with Compute Engine.如果您想要更多的控制权,可以使用其他 Google 产品以不同的方式进行配置,请考虑使用 Compute Engine 的非托管实例组。

Some history一些历史

It's worth noting that the ability to add Docker images to Compute Engine instances was an extremely recent development.值得注意的是,将 Docker 映像添加到 Compute Engine 实例的能力是最近才开发的。 And before that, App Engine Flexible was the new kid in town because we used to only have App Engine standard which definitely didn't allow you to use Docker as a base.在此之前,App Engine Flexible 是镇上的新生事物,因为我们过去只有 App Engine 标准,绝对不允许您使用 Docker 作为基础。

Key Differences主要区别

Here are the key differences in my experience:以下是我的经验中的主要区别:

  • App Engine is designed as a PaaS product and so you can customize scaling parameters in your app.yaml and App Engine reads those and takes over from you. App Engine 设计为 PaaS 产品,因此您可以在 app.yaml 中自定义缩放参数,App Engine 会读取这些参数并接管您。 It's technically true that you can do this using Compute Engine but it involves more configuration - you need to set up an instance group, a backend and a frontend.从技术上讲,您确实可以使用 Compute Engine 执行此操作,但它涉及更多配置 - 您需要设置一个实例组、一个后端和一个前端。 With App Engine, all of that is taken care of for you使用 App Engine,所有这些都为您处理
  • You can't setup any load balancers or any peripheral services or products on top of App Engine.您不能在 App Engine 之上设置任何负载平衡器或任何外围服务或产品。 App Engine Flexible went quite a way further to give the user more control and more (sorry) flexibility. App Engine Flexible 在为用户提供更多控制和更多(抱歉)灵活性方面走得更远。 However, it doesn't allow unfettered integration with other services.但是,它不允许不受限制地与其他服务集成。 Whereas with Compute Engine, you can setup an HTTPs load balancer, add your machines to different networks and subnets, set custom tags etc...而使用 Compute Engine,您可以设置 HTTPs 负载均衡器,将您的机器添加到不同的网络和子网,设置自定义标签等...

On an additional note, a more detailed explanation on the difference between App Engine and Compute Engine can be found here .另外请注意,可以在此处找到有关 App Engine 和 Compute Engine 之间差异的更详细说明。

App Engine is PaaS service and managed service from google. App Engine是来自 google 的 PaaS 服务和托管服务。 It has options as dynamic instance and resident instance to achieve scaling.它有动态实例和常驻实例选项来实现缩放。 It has predefined runtime setup for the supported languages, we just need to execute the code.它为支持的语言预定义了运行时设置,我们只需要执行代码。 It supports execution of multiple versions of the applications simultaneously, so we can release the code changes for separate group of users.它支持同时执行多个版本的应用程序,因此我们可以为不同的用户组发布代码更改。 It's inherently support container environment, so the basic details like number of pods or nodes need no to provide.它本身就支持容器环境,因此不需要提供 Pod 或节点数量等基本细节。 Even for the App Engine Standard if there is no load than the node count reduced to zero means no cost.即使对于App Engine 标准,如果没有负载,节点数减少到零也意味着没有成本。 App Engine Flexible requires at-least one up instance. App Engine Flexible 至少需要一个 up 实例。 Here the deployment can be done by a single command ie gcloud app deploy app.yaml这里的部署可以通过单个命令完成,即gcloud app deploy app.yaml

Compute engine is IaaS so developer needs to create a machine, setup the desired software's, setup the docker container environment.计算引擎是 IaaS,因此开发人员需要创建一台机器,设置所需的软件,设置 docker 容器环境。 There will be no scaling, version management, traffic control,security, firewall, health monitoring and repair etc. So with compute engine it's really tough to achieve the capabilities provided by App Engine.将没有缩放、版本管理、流量控制、安全、防火墙、健康监控和修复等。因此使用计算引擎很难实现 App Engine 提供的功能。 The batter alternative is Kubernetes Engine.更棒的选择是 Kubernetes Engine。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kube.netes 和 Kube.netes Engine 有什么区别? - What's the difference between Kubernetes and Kubernetes Engine? aws数据库服务与数据库引擎有什么区别 - what is difference between aws database service vs database engine Compute Engine 部署容器 - Compute Engine Deploy Container GCP - 无法将 docker 图像从 Compute Engine 推送到 Container Registry - GCP - Not able to Push docker image from Compute Engine to Container Registry Compute Engine API - 如何使用容器创建实例? - Compute Engine API - How to create an instance with container? 关闭 Google Compute Engine VM 时优雅地停止 docker 容器 - Gracefully stop docker container when shutting down Google Compute Engine VM Google Compute Engine:无法通过 http 请求访问正在运行的 Docker 容器 - Google Compute Engine: Can't access running Docker container through http request 从 App Engine 在 Google Compute Engine 中执行 python 脚本 - Executing a python script in Google Compute Engine from App Engine IAP 为 App Engine 和 Compute Engine 访问打开两个会话 - IAP opens two sessions for App Engine and Compute Engine access 从 App Engine 和外部连接到 Google Compute Engine 上的 MySQL - Connect to MySQL on Google Compute Engine from App Engine and externally
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM