What is the difference between scalability and elasticity?

Amazon Web-ServicesCloudScalabilityElasticity

Amazon Web-Services Problem Overview


I've heard many people using both terms interchangeably. However, in my opinion there is difference between them:

SCALABILITY - ability of a software system to process higher amount of workload on its current hardware resources (scale up) or on current and additional hardware resources (scale out) without application service interruption;

ELASTICITY - ability of the hardware layer below (usually cloud infrastructure) to increase or shrink the amount of the physical resources offered by that hardware layer to the software layer above. The increase / decrease is triggered by business rules defined in advance (usually related to application's demands). The increase / decrease happens on the fly without physical service interruption.

Again, scalability is a characteristic of a software architecture related to serving higher amount if workload, where elasticity is a characteristic of the physical layer below, entirely related to hardware budget optimizations.

Have I got the difference between these two non-functional architectural characteristics right? May someone give specific examples, so we could draw more distinctive border between these two terms?

Amazon Web-Services Solutions


Solution 1 - Amazon Web-Services

Scalability is the ability of the system to accommodate larger loads just by adding resources either making hardware stronger (scale up) or adding additional nodes (scale out).

Elasticity is the ability to fit the resources needed to cope with loads dynamically usually in relation to scale out. So that when the load increases you scale by adding more resources and when demand wanes you shrink back and remove unneeded resources. Elasticity is mostly important in Cloud environments where you pay-per-use and don't want to pay for resources you do not currently need on the one hand, and want to meet rising demand when needed on the other hand.

Solution 2 - Amazon Web-Services

_

Scalability: "Increasing" the capacity to meet the "increasing" workload.

Elasticity: "Increasing or reducing" the capacity to meet the "increasing or reducing" workload.


Scalability: In a scaling environment, the available resources may exceed to meet the "future demands".

Elasticity: In the elastic environment, the available resources match the "current demands" as closely as possible.


Scalability: Scalability adapts only to the "workload increase" by "provisioning" the resources in an "incremental" manner.

Elasticity: Elasticity adapts to both the "workload increase" as well as "workload decrease" by "provisioning and deprovisioning" resources in an "autonomic" manner.


Scalability: Increasing workload is served with increasing the power of a single computer resource or with increasing the power by a group of computer resources.

Elasticity: Varying workload is served with dynamic variations in the use of computer resources.


Scalability: Scalability enables a corporate to meet expected demands for services with "long-term, strategic needs".

Elasticity: Elasticity enables a corporate to meet unexpected changes in the demand for services with "short-term, tactical needs".


Scalability: It is "increasing" the capacity to serve an environment where workload is increasing.

This scalability could be "Scaling Up" or "Scaling Out".

(Example:

Scaling Up - increasing the ability of an individual server

Scaling out - increasing the ability by adding multiple servers to the individual server.)

Elasticity: It is the ability to "scale up or scale down" the capacity to serve at will.


Scalability: To use a simile, "scaling up" is an individual increasing her power to meet the increasing demands, and "scaling out" is building a team to meet the increasing demands.

Elasticity: To use a simile, a film actor increasing or reducing her body weight to meet differing needs of the film industry.

_

Solution 3 - Amazon Web-Services

Usually, when someone says a platform or architectural scales, they mean that hardware costs increase linearly with demand. For example, if one server can handle 50 users, 2 servers can handle 100 users and 10 servers can handle 500 users. If every 1,000 users you get, you need 2x the amount of servers, then it can be said your design does not scale, as you would quickly run out of money as your user count grew.

Elasticity is used to describe how well your architecture can adapt to workload in real time. For example, if you had one user logon every hour to your site, then you'd really only need one server to handle this. However, if all of a sudden, 50,000 users all logged on at once, can your architecture quickly (and possibly automatically) provision new web servers on the fly to handle this load? If so, it could be said that your design is elastic.

Solution 4 - Amazon Web-Services

Scalability refers to the ability for your resources to increase or decrease in size or quantity.

There's a lot of infrastructures involved to make something like this happen, so it's no easy task.

Many of the services in AWS are scalable by default, which is one of the reasons that AWS is so successful.

Scalability is pretty simple to define, which is why some of the aspects of elasticity are often attributed to it.


Elasticity is the ability for your resources to scale in response to stated criteria, often CloudWatch rules.

This is what happens when a load balancer adds instances whenever a web application gets a lot of traffic.

Scalability is required for elasticity, but not the other way around.

Not all AWS services support elasticity, and even those that do often need to be configured in a certain way.

--

In resume, Scalability gives you the ability to increase or decrease your resources, and elasticity lets those operations happen automatically according to configured rules.

Solution 5 - Amazon Web-Services

One picture is worth a thousand words. I found it in Fundamentals of Software Architecture: An Engineering Approach by Mark Richards and Neal Ford.

enter image description here

Solution 6 - Amazon Web-Services

Scalability handles the increase and decrease of resources according to the system's workload demands. So scalability does not have to be done automatically.

Elasticity is the ability to automatically or dynamically increase or decrease the resources as needed. Elastic resources match the current needs and resources are added or removed automatically to meet future demands when it is needed.

So in short ability of a system to handle Scalability automatically is elasticity

Solution 7 - Amazon Web-Services

Elasticity is related to short-term requirements of a service or an application and its variation but scalability supports long-term needs.

Solution 8 - Amazon Web-Services

Elasticity is the ability of a system to increase (or decrease) its compute, storage, netowrking, etc. capacity based on specified criteria such as the total load on the system.

For example, you can implement a backend system that initially has 1 server in its cluster but configure it to add an extra instance to the cluster if the average per minute CPU utilization of all the servers in the cluster exceeds a given threshold (e.g. 70%).

Similarly, you can configure your system to remove servers from the backend cluster if the load on the system decreases and the average per-minute CPU utilization goes below a threshold defined by you (e.g. 30%).

As another example, you can configure your system to increase the total disk space of your backend cluster by an order of 2 if more than 80% of the total storage currently available to it is used. If for whatever reason, at a later point, data is deleted from the storage and, say, the total used storage goes below 20%, you can decrease the total available disk space to its original value.

But some systems (e.g. legacy software) are not distributed and maybe they can only use 1 CPU core. So even though you can increase the compute capacity available to you on demand, the system cannot use this extra capacity in any shape or form. Such systems are not scalable. But a scalable system can use increased compute capacity and handle more load without impacting the overall performance of the system.

A scalable system does not depend on elasticity though. Traditionally, IT departments could replace their existing servers with newer servers that had more CPUs, RAM, and storage and port the system to the new hardware to employ the extra compute capacity available to it.

Cloud environments (AWS, Azure, Google Cloud, etc.) offer elasticity and some of their core services are also scalable out of the box. Furthermore, if you build a scalable software, you can deploy it to these cloud environments and benefit from the elastic infrastructure they provide you to automatically increase/decrease the compute resources available to you on-demand.

Solution 9 - Amazon Web-Services

From my limited understanding of those concepts, an example:

Say we have a system of 5 computers that does 5 work units, if we need one more work unit to be done we we'll have to use one more computer. That is a scalable system but it is not elastic. Somebody going to have to go and get that other computer. Also, if a new computer is purchased and the extra work unit is not needed any more, the system get stuck with a redundant resource.

Now, lets say that the same system uses, instead of it's own computers, a cloud service that is suited for it's needs. Ideally, when the workload is up one work unit the cloud will provide the system with another "computing unit", when workload goes back down the cloud will gracefully stop providing that computing unit. That is a situation where a system is both scalable and elastic.

Solution 10 - Amazon Web-Services

Scalability and Elasticity both refer to meeting traffic demand but in two different situations.

Scalability is meeting predictable traffic demand while elasticity is meeting sudden traffic demand.

enter image description here

image ref: https://www.skylinesacademy.com/blog/2020/3/6/az-900-cloud-concepts-scalability-and-elasticity

Solution 11 - Amazon Web-Services

Both, Scalability and Elasticity refer to the ability of a system to grow and shrink in capacity and resources and to this extent are effectively one and the same. The difference is usually in needs and conditions under which this happens. Scalability is mostly manual, predictive and planned for expected conditions. Elasticity is automatic and reactive to external stimuli and conditions. Elasticity is automatic scalability in response to external conditions and situations.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMiroslav DzhokanovView Question on Stackoverflow
Solution 1 - Amazon Web-ServicesArnon Rotem-Gal-OzView Answer on Stackoverflow
Solution 2 - Amazon Web-ServicesAnandGView Answer on Stackoverflow
Solution 3 - Amazon Web-ServicesMike ChristensenView Answer on Stackoverflow
Solution 4 - Amazon Web-ServicesvaldeciView Answer on Stackoverflow
Solution 5 - Amazon Web-ServicesCoyBitView Answer on Stackoverflow
Solution 6 - Amazon Web-ServicesRahul SaxenaView Answer on Stackoverflow
Solution 7 - Amazon Web-ServicesAboozar RajabiView Answer on Stackoverflow
Solution 8 - Amazon Web-ServicesBehrangView Answer on Stackoverflow
Solution 9 - Amazon Web-ServiceszoharView Answer on Stackoverflow
Solution 10 - Amazon Web-ServicesousecTicView Answer on Stackoverflow
Solution 11 - Amazon Web-ServicesSandeep ChiluveruView Answer on Stackoverflow