While at a larger scale, most applications have a unique architecture, they usually start the same way as our Hello World app with a simple monolith.
There are two common ways to scale a monolithic application:
- Scaling it vertically, meaning using bigger EC2 instances such that you get an instance with more CPU, more memory, and better network performance
- Scaling it horizontally, meaning adding more and more EC2 instances running the same code and load balancing the traffic across them
Scaling vertically is, of course, the easiest approach when it comes down to handling more traffic, but because we are trying to solve both the performance and the redundancy issues, we need to include the horizontal scaling component to our scaling strategy. In addition, you may remember the "just-in-time infrastructure" concept explained in Chapter...