Patterns for elasticity
An application must react to variable load conditions. If the load increases or decreases, the application should not be impacted and should be able to handle any load level without impacting the performance. One unmentioned aspect of elasticity is that your application should not use unnecessary resources. For example, if you expect your server to handle one thousand users per minute, you will not set up an infrastructure to handle ten thousand users as you will be paying 10 times the required cost. At the same time, you need to make sure that if the load increases, your application does not get choked.
Let's take a look at some of the important patterns that help us maintain the elasticity of the system.
Single responsibility pattern
Also known as the simple-component pattern or microservices pattern, the single-responsibility pattern is kind of an extension to the single-responsibility principle for OOP. We already discussed the single-responsibility principle in...