0 238 en

Scale Cube: A Guide to Scalability in System Architecture

What is the Scale Cube?

One common way to think about scalability is through the Scale Cube, a model introduced by Martin L. Abbott and Michael T. Fisher in their book The Art of Scalability. The Scale Cube helps engineers understand different ways to scale applications, presenting three dimensions of scaling: 

  1. X-axis: Scaling by duplicating instances of the same service (horizontal scaling).
  2. Y-axis: Scaling by decomposing functionality into microservices (functional decomposition).
  3. Z-axis: Scaling by partitioning data (data sharding).

Let’s take a look at them separately. 

X-Axis: Horizontal Duplication

scale cube x-axis
X-Axis: Horizontal Duplication

The X-axis refers to scaling by running multiple identical copies of the application and distributing traffic between them. This is often done through load balancing and is a classic approach to horizontal scaling.

How it works:

  1. You duplicate the same service and run it on multiple servers or containers.
  2. A load balancer distributes incoming requests across these instances.

Pros:

  • Easy to implement, no code changes needed.
  • Improves availability and redundancy.
  • Elastic scaling: Add or remove instances as needed.

Cons:

  • Cost. As you have to pay for each of the extra instances.
  • A shared state requires external storage (e.g., Redis).
  • Data management across instances.

Y-Axis: Functional Decomposition (Microservices)

scale cube: Y-Axis: Functional Decomposition
Y-Axis: Functional Decomposition

The Y-axis refers to scaling by breaking the application into smaller, distinct services based on functionality. Each service handles a specific part of the system and can be scaled independently.

How it works:

  1. Split the monolithic application into smaller services, each with distinct capabilities.
  2. Services communicate through APIs.

Pros:

  • Develop, deploy, and scale services separately.
  • One service failure doesn't affect others.
  • Scale only the services that need it.

Cons:

  • Increases workload for deployment and monitoring.
  • More services add system complexity.
  • cross-service communication & data consistency overhead

Z-Axis: Data Partitioning (Sharding)

Z-Axis: Data Partitioning (Sharding)
Z-Axis: Data Partitioning

The Z-axis focuses on scaling by partitioning data. Each instance of the app is responsible for a specific subset of the data (i.e., sharding), which helps distribute both the data and the load across multiple servers.

How it works:

  1. Data is divided into shards, and each shard is managed by a different instance.
  2. Requests are routed to the relevant shard.

Pros:

  • Limits the load per server.
  • Horizontal scalability: Add more shards as data grows.
  • Resource optimization: Tailor shards for specific configurations.

Cons:

  • Increased complexity: Sharding requires careful planning.
  • Data distribution: Hotspots can cause imbalances.
  • Cross-shard operations complexity

Conclusion

When designing a system, it’s essential to consider the pros and cons of each axis for scaling and select the approach that best fits your application's needs and constraints. In many cases, real-world systems end up using a combination of these strategies to achieve optimal scalability.

  • X-axis: Horizontal duplication is a great starting point for simple scalability, but has limitations.
  • Y-axis: Functional decomposition enables teams to break down monolithic applications into microservices, allowing for more granular scaling and fault isolation.
  • Z-axis: Data partitioning is an advanced technique that can improve scalability for data-intensive applications but requires careful design to avoid common pitfalls.

By understanding the Scale Cube, you’ll be better equipped to build systems that can handle increasing loads while maintaining performance, reliability, and efficiency.

Next to read

In addition, you can check the article: 6 Steps to scale your application in the cloud

Comments:

Please log in to be able add comments.