Software scalability

Software scalability

English text only

Scalability is the ability of a system to handle growing amounts of work in a capable manner. If a system is scalable it can be enlarged to accommodate increasing workload.

A software system is scalable if it can serve a more and more users without reducing performance, by adding other resources, usually hardware.

There is no easy recipe to make a generic application scalable, but you have to tailor that application and build it with scalability in mind since the beginning.

Here a list of well known methodologies::

Scaling Up
Basically, it consists on upgrading the hardware where your application is running (eg. faster processors, faster hard-drives, etc.). It can do well in the short-term, but if your project requires new resources constantly, it may turn to a recipe for a disaster.
Scaling Out
Adding hardware resources in response to the growing workload. This type of scalability can be categorized in three types:
  • horizontal scalability, you add new machines when the workload grows.
    Eg.: in high read-write ratio systems, you can scale out by data replication.
  • functional partitioning, or division of duties, means reserving different resources to different tasks.
    Eg.: you can obtain it by webservice architectures (SOA).
  • data sharding refers to split a single entity into smaller pieces.
    Eg.: data splitting by geographical location.
Scaling Back
You archive and purge unneeded data. It can be a good short-term strategy to buy time.
Scaling by Clustering
A cluster consists of several hosts configured to appear as a single server.
Eg.: database cluster architecture like MySql Cluster.


In the following diagram we can see an example of horizontal scalability for read write high ratio systems.

Each web server uses the master database for writing and a random replica database for reading. A load balancer is properly configured to send stateless requests to the databases.

The diagram below shows an example of functional partitioning:

Application data is split by content type (Forum, News) or by operational functions (Login).

The next diagram is an oversimplified example of data sharding:

user's data is split in three databases by userid.

Load balancing, server proxy and data caching are some of the technologies used to increase or make possible system scalability.

Scalability must be designed from the inception of the system, or any strategy you choose can be transformed in a bottleneck in the medium to long-term.

Scaling out is a must for real scalability, but you have to make your choices with real workload in mind, and without overengineering.

As a rule of thumb, keep everything simple.

Scalability Rules High Performance MySQL

Related News