System Scalability and Strategies to Build a Scalable System

In very simple terms, system scalability is the system’s capability to handle a growing amount of work while still being able to perform effectively. This could be for example getting more requests to your system as the system gets more users or having the need to handle more database calls.

But why is scalability important? Why should we even care about it? Well, it’s a lot about caring about the users of your system and meeting their changing needs. Also, being able to deliver those in a decent amount of time without a high cost. Not to forget about, it’s much more fun to work with a system that is easy to change without having to worry about that some existing functionality might break by doing that.

Characteristics of a Non-Scalable System

So, how do you identify if you have a scalable system or not? Well, let’s take a look at some of the characteristics of a non-scalable system and try to identify if your system have some of these or not:

  • Adding new functionality is a struggle and takes too much time.
  • Adding new functionality breaks the existing functionality and bugs arise.
  • Learning curve to understand the system is steep.
  • Requests take long time to respond to or getting timeouts. Note: you should aim for responses under 200ms.
  • Decreased availability of the system.
  • Database is responding slowly or not at all.

Did some of these sound familiar? Alright, no worries! Let’s see how to improve your system scalability and what are the strategies to do that.

System Scalability Strategies

When we are talking about system scalability we are usually talking about two scaling strategies: vertical (scaling up) and horizontal (scaling out).

Vertical scaling is about upgrading to a more powerful machine when your system is contained in a single place (e.g on one server). Most of the time it can get expensive and might not be the best solution when the software needs to grow quickly. In addition, keep it mind that there is a limit to how large a single server can be.

In contrast, horizontal scaling is when your software is located in several places (e.g. on multiple servers) and the workload is spread out across the new infrastructure. This can be achieved by using load balancing. Horizontal scaling is usually about adding more cheap machines and is considered to be a better option than vertical scaling for rapid growth.

Following are some extra tips to keep in mind on how to build a well scalable system:

  • Location matters. Software should be close to the client to reduce the response time.
  • Cache where possible. Don’t do things over and over again when you can simple cache it and have a faster software. Consider if your users need the “latest data” right away.
  • Use asynchronous processing where possible.
  • Pick a database according to your needs. Think for example if you should use a relational or a NoSQL database.
  • Consider having multiple databases to spread the load. In addition, think if having separate read and write databases would make sense.
  • Write clean maintainable code and cover it with well thought through tests.
  • Avoid single point of failure. Keep a distributed mindset.
  • Monitor your system to detect issues early on and act accordingly.

Conclusion

System scalability is the system’s capability to handle a growing amount of work while still being able to perform effectively. In order to build a scalable system we have two strategies: vertical scaling and horizontal scaling. Horizontal scaling is considered to be a better scaling strategy when your system needs to grow rapidly.

I would love to end this article with a quote that is very true about system scalability and that my current team would love:  

“If you can’t split it, you can’t scale it”.

Be the first to reply

Leave a Reply

Your email address will not be published. Required fields are marked *