Elastic Beanstalk
Elastic Beanstalk is a deployment service which allows you to deploy your application to complex artchitectures and environments on AWS. It can create highly available and fault tolerant achitectures. It automatically handles capacity provisioning, load balancing, scaling and application health and monitoring.
New versions of an app could be uploaded through the console or CLI. Complete envirions could also be re-deployed. Applications could be:
- Docker Containers
- NodeJS, Java, .NET, PHP, Ruby, Python & Go.
- On servers like Apache, Nginx, Passenger, IIS
You supply your code and elastic beanstalk will do the rest automatically.
- Create application
- Upload a version
- Launch environment (EC2 instances)
- Manage environment
Highly Available and Fault Tolerance.
- AWS Cloud comprises of regions.
- Regions comprises of Availability Zones (AZ)
- Availability Zones (AZ)
- Our VPC launched across multiple AZs
- Load balancing + auto scaling group
Deployment options
-
All at once. Remember your app will be down during deployment. Hence if you have 20 EC2 instances all at once could take a while and your app will be down during thi time.
-
Rolling (a batch at a tie), Rolling with additional batch. Deploy in batches to minimize downtime. Additional batch (e.g 2 environments if a batch is 2) created during deployment to prevent downtime.
-
Immutable (2 environments temporarily). If you have 10 EC2 instances, it will create addtional 10 EC2 instances during deployment to prevent down-time.
-
Blue - Green (2 environments) - One environ could be a developing while the other could be production. Deployment makes the new environ production and the old development environ. Domain name for both environs are switched automatically for you to prevent downtime.
Highly Available and Fault Tolerant NodeJS App
Management Console -> Services -> Elastic Beanstalk -> Get Started
Create a new app -> Select type - > Configure more options
- Select high availability
- After creation, the endpoint URL will be at the top
Acronyms
- HA - Highly Available
- FT - Fault Tolerance
Links
-
Notes on AWS - Part 2 - Storages, Databases, Compute and Content Delivery
-
Notes on AWS - Part 3 - Management Tools, App Integration and Customer Engagement
-
Notes on AWS - Part 6 - Developer, Media, Mobile, Migration, Productivity, IoT and Gaming