-
ElasticBeanStalkCloud/AWS 2020. 8. 2. 01:58
1. Overview
ElasticBeanStalk is a developer-centric view of deploying an application on AWS. It uses all the components such as EC2, ASG, ELB, RDS, and etc. But it's all in one view that's easy to make sense of and still have full control over the configuration. BeanStalk is free but you pay for the underlying instances.
1.1 Motivation
- Managing infrastructure
- Deploying Code
- Configuration all the databases, load balancers, etc
- Scaling concerns
- Most web apps have the same architecture (ALB + ASG)
- All the developers want is for their code to run
- Possibly, consistently across different applications and environments
2. Description
- Managed service
- Instance configuration / OS is handled by beanstalk
- Deployment strategy is configurable but performed by ElasticBeanStalk
- Just the application code is the responsibility of the developer
- Three architecture models:
- Single Instance deployment: good for dev
- LB + ASG: great for production or pre-production web applications
- ASG only: great for non-web apps in production(workers, etc.)
3. Component
3.1 Application
3.2 Application Version: each deployment gets assigned a version
3.3 Environment name(dev, test, prod): free naming
4. Lifecycle of environments
- You deploy application versions to environments and can promote application versions to the next environment
- Rollback feature to the previous application version
- Full control over the lifecycle of environments
5. Support Platform
- Go
- Java SE
- Java with Tomcat
- .NET on Windows Server with IIS
- Node.js
- PHP
- Python
- Ruby
- Packer Builder
- Single Container Docker
- Multicontainer Docker
- Preconfigured Docker
- If not supported, you can write your custom platform(advanced)
6. Deployment Modes
6.1 All at once
- Fastest
- Application has downtime
- Great for quick iterations in a deployment environment
- No additional cost
6.2 Rolling
- Application is running below capacity
- Can set the bucket size
- Application is running both versions simultaneously
- No additional cost
6.3 Rolling with additional batches
- Application is running at capacity
- Can set the bucket size
- Application is running both versions simultaneously
- Small additional cost
- Additional batch is removed at the end of the deployment
- Longer deployment
- Good for prod
6.4 Immutable
- Zero downtime
- New Code is deployed to new instances on a temporary ASG
- High cost, double capacity
- Longest deployment
- Quick rollback in case of failures(just terminate new ASG)
- Great for prod
6.5 Blue/Green
- Not a "direct feature" of Elastic Beanstalk
- Zero downtime and release facility
- Create a new "stage" environment and deploy v2 there
- The new environment (green) can be validated independently and roll back if issues
- Route 53 can be set up using weighted policies to redirect a little bit of traffic to the stage environment
- Using Beanstalk, "swap URLs" when done with the environment test
7. Reference
'Cloud > AWS' 카테고리의 다른 글
Simple Storage Service (S3) (0) 2020.11.24 CloudFront (0) 2020.11.24 AWS Relational Database Service(RDS) (0) 2020.07.26 Elastic Load Balancing (ELB) (0) 2020.07.12 Serverless Architecture in AWS and Serverless Application Model(SAM) (0) 2020.07.11