Scaling the Rocket application
After developing the Rocket application and deploying it to a production environment, the application might need to be scaled up due to increasing usage. There are a couple of ways to scale the web application, and they can be categorized into two categories: vertical scaling and horizontal scaling.
Vertical scaling means increasing the resources for a single node. For example, we replace the CPU of the computer that runs the Rocket application with a CPU with higher speed. Another example of vertical scaling is increasing the amount of RAM in the computer that runs the Rocket application.
Horizontal scaling is scaling the application by adding more nodes or more computers to handle the workload. An example of horizontal scaling is running two servers and setting up a Rocket web server on each server.
Suppose we have the following system:
We can first move the database...