The purpose of the couple,
Launch Configurations and
Auto Scaling Groups shown below is to ensure scalability and reliability:
- Scalability: if there is an increase of requests/CPU, the system needs to scale up and add instances. In the same way, if the traffic goes down, it is necessary to remove unnecessary resources.
- Reliability: if one instance goes down for any reason, the Auto Scaling system automatically replaces it with a new one.
You need to start the instance quickly in order to create an image, so by using the
user_data option you can also install a software program as we did during the monolith configuration at the beginning of this chapter. However, this results in an additional amount of time in which it is necessary to start a new instance.
When you need to scale up, this is because you need to satisfy an increase in demand and therefore need to do this as soon as possible. For this reason, it is a good...