Chapter 6: Scaling a gRPC Application
If you expect your web application to support a high number of connections, running a single instance of it will not be enough. You will have to scale it.
There are two types of scaling you can do – scaling up and scaling out. Scaling up is when you add more hardware to the machine running the server-side components of your application. This is a pure hardware solution and it has its limits. Therefore, we will not cover it in this chapter.
Scaling out, on the other hand, is when you run multiple instances of the same application, so any particular instance of it will not be overwhelmed by an excessive number of connections. The connections will be distributed evenly between the running instances.
The ability to easily scale out granular components of a distributed application is one of the main purposes of microservices architecture. This is what we will cover in this chapter.
To evenly distribute incoming connections between...