Scaling out the RESTful API
Scaling out is a technique that improves the availability and capacity of a system by adding multiple instances for a given service.
In modern application platforms, such as container orchestrators such as Kubernetes or cloud providers hosting platforms such as Azure App Services or AWS Elastic Beanstalk, the systems may scale out and scale in automatically. For instance, in Kubernetes, you can configure an autoscale rule that increases the number of instances of your service when the average CPU has been over 70% for the last 5 minutes. You can also configure it in another way – when the usage of your application is low, you can scale in your application. This means you can decrease the number of instances of the application.
Scaling out an application shouldn’t necessarily be automated; you can scale it manually, as we’ll do in this recipe.
Scaling out involves distributing incoming requests across multiple instances of a...