Scaling a monolithic application
While at a larger scale, most applications have a unique architecture, they usually start the same way as our helloworld
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 balance 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 1, TheCloud and the DevOps Revolution, that allows Amazon and many other start-ups to provision just enough servers to handle the traffic...