3

다중 컨테이너 시스템 작업. 나는 탄력있는 콩팥과 ECS의 장단점을 평가했다. this과 같은 많은 질문이 있는데, 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.  | 
+--------------------------------------------+--------------------------------------------------+ 

세 번째 요점은 확실하지 않습니다. 내가 틀렸다면 나를 바로 잡으십시오. 이 둘 사이에 다른 점이 있으면 알려주십시오.

답변

5

첫 번째 사항 : Elastic Beanstalk을 사용하지 않고 애플리케이션과 함께 다른 AWS 리소스를 배포하려는 경우 CloudFormation 템플릿을 만들고 CloudFormation 변경 세트를 사용하여 애플리케이션을 시작, 업그레이드 및 분리합니다.

세 번째 점인 Elastic Beanstalk은 EC2 인스턴스 생성 및 삭제 수준에서만 작동하는 AWS 자동 크기 조절 기능을 사용합니다. 따라서 Elastic Beanstalk에서 단일 컨테이너/다중 컨테이너 환경을 사용하는 경우 확장은 다른 컨테이너를 생성하는 것이 아니라 모든 동일한 컨테이너로 Docker를 실행하는 전체 EC2 인스턴스를 생성합니다. Elastic Beanstalk을 사용하지 않고도 CloudFormation 템플릿에서 자동 스케일링을 사용할 수 있습니다. EC2 인스턴스 수준에서만 작동합니다.

또 다른 옵션은 자동 크기 조정과 함께 Elastic Beanstalk를 사용하고 확장하려는 컨테이너가있는 단일 컨테이너 도커에 환경을 설정하고 다른 컨테이너를 AWS::ECS::Service custom resources으로 추가하는 것입니다. 예를 들어, 단일 컨테이너는 처리량이 많은 프론트 엔드가 될 수 있지만 다른 컨테이너는 공유 데이터 저장소가 될 수 있습니다. 이렇게하면 Elastic Beanstalk에서 좋은 버전 관리/배포/롤아웃을 얻을 수 있지만 단일 인스턴스 인 컨테이너 (Elastic Beanstalk 환경)가 있습니다.