Lak*_*kar 4 amazon-web-services amazon-ecs amazon-elastic-beanstalk
在多容器系统上工作.我正在评估弹性豆茎和ECS的优缺点.有喜欢的许多问题本该说比EB ECS时,拥有超过容器更精确的控制,但他们并没有列出来.在我看来,这是他们之间的区别:
+--------------------------------------------+--------------------------------------------------+
| Elastic Beanstalk | ECS |
+--------------------------------------------+--------------------------------------------------+
| Natively support auto-scaling and load | Auto-scaling can be done with |
| balancing. Has the ability to deploy | some extra efforts. But other AWS resources |
| other AWS resources along with the | cannot be deployed with ECS. |
| containers. | |
+--------------------------------------------+--------------------------------------------------+
| Container definitions are written in | Container definitions has to be written in a |
| dockerrun.aws.json file. All the links | separate task definition file. Scaling of the |
| can be written here. This is more like | container can be specified in |
| docker compose file. | service definitions. |
+--------------------------------------------+--------------------------------------------------+
| Scaling happens based on CloudWatch | Here, we have a precise control to scale |
| metric. But when a new instance is | a particular task (container). This is more |
| launched, the whole containers in | like declarative. It does not take in to account |
| task definition file will be launched | about the instances, it maintains the count of |
| again (imperative), even though some | tasks correctly. Scales based on the |
| of the containers actually has no traffic. | CPU/Memory usage of a specific container. |
+--------------------------------------------+--------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)
我不确定第三点.纠正我如果我错了.如果这两者之间存在其他差异,请告诉我.
第一点:如果您不使用Elastic Beanstalk并希望在应用程序中部署其他AWS资源,请创建CloudFormation模板并使用CloudFormation更改集启动,升级和拆除您的应用程序.
第三点,Elastic Beanstalk使用AWS Auto Scaling功能,该功能仅适用于创建和删除EC2实例的级别.因此,如果您在Elastic Beanstalk中使用单个容器/多容器环境,则扩展不仅会创建另一个容器,而是一个运行Docker的整个EC2实例,其中包含所有相同的容器.也可以在不使用Elastic Beanstalk的情况下从CloudFormation模板使用Auto Scaling.它仍然只适用于EC2实例的级别.
另一个选择是将Elastic Beanstalk与其Auto Scaling一起使用,将环境设置为具有您想要扩展的容器的单个容器docker,并将其他容器添加为AWS :: ECS :: Service自定义资源.例如,您的单个容器可以是处理繁重的前端,而另一个容器可以是共享数据存储.这样,您可以从Elastic Beanstalk获得良好的版本控制/部署/部署,但是具有单实例的容器(每个Elastic Beanstalk环境).
| 归档时间: |
|
| 查看次数: |
3564 次 |
| 最近记录: |