Table of contents
- Scale Cube Model
- High-level definition of Microservices based on the Scale Cube Model
Scale Cube Model
The Art of Scalability (Martin Abbot and Michael Fisher) describes a 3-D scalability model called as the Scale Cube model. The model defines three ways to scale an application:
- X-axis scaling
- Y-axis scaling
- Z-axis scaling
We shall look at them in the following sequence - X-axis, Z-axis, and Y-axis building up context, finally reaching at a high-level definition of Microservices.
X-axis Scaling, a.k.a., Horizontal Duplication - Scale by cloning
- Common way to scale a monolithic application.
- The requests are load-balanced among all the duplicate identical instances of an application.
- A great way to improve the Capacity and Availability of the application.
Z-axis Scaling, a.k.a., Data Partitioning - Scale by splitting things that are similar based on an attribute of the request
- In Z-axis scaling also multiple instances of the monolith application run, but
- unlike X-axis scaling each instance is responsible for only a subset of the data.
- The requests are routed based on a request attribute, for e.g. - userId, so that each instance is responsible for a subset of users.
- The request router uses the userId specified in the Authorization header to select one of the identical instances of the application.
- A great way to scale an application to handle increasing transaction and data volumes.
Y-axis Scaling, a.k.a., Functional Decomposition - Scale by splitting things that are different functionally
- X- and Z-axis scaling improve the capacity and availability of an application, but
- neither solves the problem of increasing development and application complexity.
- To address this, Y-axis scaling or functional decomposition needs to be applied - splitting monolith into a set of services.
- From the entire application's point of view:
- A service is a mini application that implements narrowly focussed functionality, such as Billing, Payment Gateway, Tax, and so forth.
- A service is scaled using X-axis scaling, although Z-axis scaling might also make sense for some services
High-level definition of Microservices based on the Scale Cube Model
- Microservice Architecture (or simply, Microservices) is an architectural style that functionally decomposes an application into a set of services (Y-axis scaling).
- This definition does not say anything about the size of services - what matters is that each has a focussed, cohesive set of responsibilities.
Did you find this article valuable?
Support Krishna Kumar Mahto by becoming a sponsor. Any amount is appreciated!