Beanstalk Flashcards
What is elastic beanstalk?
It is a way to easily deploy well known architectures
What are the two possible environments on beanstalk?
Web server - ELB + ASG + EC2
Worker - SQS + ASG + EC2 - scale based on number of SQS messages
What are elastic beanstalk deployment modes?
All at once
* destroy all instances and raise new ones
Rolling
* creates new instances, destroying old ones, based on a bucket size. When they are healthy, move to the next bucket. Stops when all instances are running the new version.
Rolling with additional batches
* creates new instances, without destroying the old ones, creating additional instances temporarily (increases cost)
Immutable
* Creates a new ASG with the new version, running one instance
* when the new instance is ok, merge with the old one
* kills new ASG
* kills older version
* fast rollback, since is only kill the new ASG
Blue green
* create a new env (green) and send part of the traffic to green env to perform tests
* when green is ok, shutdown blue
Traffic splitting (canary testing)
* New app version is deployed to a temp ASG with same capacity
* Small % of traffic is sent to temp ASG for some time
* ALB performs the traffic splitting
What if you want to add resources on beanstalk?
If you want to add resources to Elastic Beanstalk like RDS, ElastiCache, you can create extensions.
What if you created Elastic beanstalk env and want to change ELB type?
It is not possible, you will need to create a new env, deploy your app to this env and perform a CNAME swap or route 53 update.
Why creating RDS on elastic beanstalk is not a good practice?
The database will be tied to beanstalk lifecycle. It will be destroyed with beanstalk. It is best to create RDS separately and use the connection string