What is Scaling Cube in Microservices
In this tutorial, we are going to learn about Scaling Cube in Microservices that explains the three different ways that we can scale our application.
Scaling means handling more load and more stress. In the scaling cube, we have x-axis to add more resources.
- For example, while using Amazon Web Services, you know that there is a concept called auto-scaling group, which means that as the load goes up or the CPU and memory usage of those servers go up reaching a certain threshold adds more servers to that auto-scaling group and that is part of the x-axis scaling.
- In y-axis, We split the system by functions.
- If you think each microservice as one function then y-axis allows us to scale every microservice differently, by enabling every microservice to scale individually.
- Instead of scaling the entire system just because one of the microservice is hitting with more load is wasting of resources. So by breaking down the entire system to individual functions or individual microservices helps independent scaling.
z-axis scaling is about partitioning.
- For example, we can handle the customer of each country by a different set of microservices.
- These microservices can be deployed to a region or in their country that is closer to their customer.
- In x-axis, we are just deploying more resources which is also equal to cloning the existing servers or adding more containers.
- In y-axis, We split the system by functions and services.
- In z-axis, We use data partitioning, sharing and other mechanisms.