In my last post about the cloud, I had left out a question discussing about scalability and elasticity. During my discussions and reading about cloud and learning more about it, I was always confused about the words “Scalability” and “Elasticity” in context of cloud. Most of the times, I had found these are being used interchangeably.
But what we need to understand is that Scalability IS NOT Elasticity. Now what do you mean by that? Let’s start by examining what are the meanings of these words.
Scalability
Anything that has a property to scale is called as scalable. A system (software/hardware) takes full advantage of the increased availability of resources without any changes to it. For example, if you have a software which is running on a machine with 2GB RAM. Now you increase the memory to 16GB and if the software is able to take advantage of this increase in memory, it will be called as a scalable software system. In same lines, if that software is a 32-bit process, it will not be able to take advantage of the increased memory and restrict itself to 4 GB memory limit and rest of increase will be wasted.
Scalability comes in different forms:
- Vertical Scaling or Scaling up – Adding of additional resources typically more RAM or processing power, to have the same system with more computing power and resources. E.g. if you have a software system which is causing memory pressure, you can increase the RAM in system and it will start performing adequately, given that your software is able to take advantage of increased memory resources.
No complexity is added to the system and it still remain as easy to manage as it was. Just the hardware cost is added to the system.
But this approach is not without its issues. There will be a limit up to how many resources you can add, and what will be the returns from them and falls prey to the law of diminishing returns. - Horizontal Scaling or Scaling out – Adding new nodes into a network and spread the load across different nodes. You basically add a whole new machine to the system and distribute the load among them.A very typical example in this case is, adding new Web Front Ends (WFE’s) in a web farm context, which will allow the farm to serve more number of concurrent users.
Elasticity
Now we come to the next part of the equation, about what is elasticity. As we have seen in the scalability property of a system, it can utilize all the available resources without putting hard stops on any growth. But still it is a very limiting factor.
E.g. if you are trying to increase RAM in a system to support more in-memory operations, you are still bound by the maximum memory size supported by the processor as well as the main board of the machine. You have some headroom to jump up and down, but with its inherit limitations.
Elasticity defines the scaling up and down of the scalability itself, basically giving an infinite headroom for jumping up and down.
Take for example, you have a scalable web application serving your website. Now suddenly your new product has taken the world by storm and hits to your website are going through the roof. If you are with a traditional hosting company, you would end up upgrading plans more often needed.
Now the same scenario with a cloud hosting provider, like Azure website. All you need is just keep on creating more instances as you require for the load that keeps coming in. Once the initial wave has gone down, you can scale back your number of instances to match the current load. This can also be done automatically without any human intervention.
This on-demand ability to scale up or down your resources, is what gives you almost unlimited jumping headroom. Effectively, let it behave like an elastic object!
Hope this brings in some clarity. If there is still something more on your mind, please use the comments section below to contact.
Happy coding