April 7

Scale Cube

Scale cube is a model that defines 3 ways to scale an application: X-axis, Y-axis, Z-axis

X-axis (Horizontal duplication)

Scale by cloning

You run multiple instances of the application behind a load balancer

The load balancer distributes requests among the N identical instances of the application

Great way to improve the capacity and availability of an application

Y-axis (Functional Decomposition)

Scale by splitting things that are different

For example, split by function

You split an application into a set of services

Each service has a focused, cohesive set of responsibilities. A service is scaled using X-axis scaling, and, possibly, Z-axis scaling

Great way to solve problems of increasing development and application complexity

Z-axis (Data partitioning)

Scale by splitting similar things

For example, by customer ID

You run multiple instances of the application behind a router

Each instance is responsible for only a subset of the data. The router in front of the instances uses a request attribute to route it to the appropriate instance.

Great way to handle increasing transaction and data volumes

Source

Microservices Patterns: With Examples in Java / Chris Richardson