“Scalability” of a software is its ability to sustainably manage change in scale of demand.
Let’s explore this definition –
What is meant by “demand” of a software?
“Demand” is the request for performance of the core system functionality.
What is “sustainability managing change of demand”?
It means – responding the change in demand such that the software system handles it without causing throughput bottlenecks, and the demand is served without interruption, with (optionally) taking care of economies of scale.
Economies of scale — The cost per unit of product should go down as you produce more.
What does this all means?
Let’s say, you are the CTO of Twitter-like webapp, let’s call it Trutter, where users can post small texts, “Truts” , and see each others Truts in real-time.
Now, what would it mean if you say Trutter is scalable?
It means following things –
- If you have 1000 active users today, with 10 concurrent users, and due to a super viral ad-campaign, suddenly 1,000,000 users subscribe to your app, and you have 500,000 active users, Trutter should manage to handle that surge / spike in demand, in near-real-time.
- The system should be able to provide similar real-world performance to those 500,000 users, as that of those 1000 users when the scale was very small. That is, if it takes 100 milliseconds to post one “Trut” with 1000 users, it should not take more than 300 milliseconds to post one “Trut” with 500,000 users, otherwise users will not have the same experience and may choose to leave your system.
- Optionally, if running Trutter servers cost 10$ per hour when there were 1000 active users, it should NOT cost 10*(500,000/1,000) (i.e. cost*(new_users_count/old_users_count) i.e. 5000$ to run Trutter server with 500,000 active users! In such case, the business won’t scale, especially for a free/freemium business model as that of Trutter.
- Considering the economies of scale, the cost of running servers per user should reduce as the number of users increase.
- So it may be sustainable to run servers for 500$ for those 500,000 active users.
We have talked about “scaling up”, but the system should be able to manage “scaling-down” i.e. is Trutter goes down to only 10,000 active users from the previous 500,000 , it should be able sustainably manage this i.e. the server costs or responsiveness.
There are multiple ways in which scalability of a system can be defined, usually based on the dimension to be measured, on the basis of core system functionality.
For example, for a Massively Multiplayer Online game, you might want to measure scalability in terms of change in number of “concurrent” players, or,
In case of a Content Management system, the scalability may be measured in terms of change in amount of content it can store, etc.
Building truly scalable systems can be challenging, and when you are starting up, you may end up into the spiral of “premature optimization”, and you should be able to make some predictions about the demand in advance, and optimize “just-enough” for scalability.
Hope this helps!
I’ve originally written this as a Quora answer – https://www.quora.com/What-is-meant-by-scalability-in-software-engineering/answer/Vishwajeet-Vatharkar?ch=2&share=bbc4fd6a&srid=XBHo