I am confused with scalability vs elasticity, to me both sound the same and its so confusing, is there a easy way to remember when to use one over the other especially in the exam scenarios
Since you’re looking for a very high level way to remember this specifically in exam scenarios;
Scalable environments only care about increasing capacity to accommodate an increasing workload.
Elastic environments care about being able to meet current demands without under/over provisioning, in an autonomic fashion.
The key difference in an exam scenario is; scalable systems don’t necessarily mean they will scale back in/down – it’s only about being able to reach peak loads. Elastic workloads however, will recognize dynamic demands and adapt to them, even if that means reducing capacity.
An example being, you have a web app that needs to support 1,000 active users for one day, so you meet that demand by provisioning 10 servers in total – but after that one day, you only ever have 10 active users, thus you only need 1 server. In this case, a scalable system would be able to scale to meet the 1,000 active users with the additional 9 servers – so that’s cool, our system scaled! But now we’re left with an abundance of over-provisioned capacity and we have to deal with that.
If our system was elastic for the above example, the process would have been automatic – our environment would have recognized the increasing workload, so it would have provisioned the necessary resources. Then when that day was over and the workload decreased significantly, our systems would have de-provisioned the servers as we didn’t need them anymore.
An environment which "reacts" to a particular set of predefined criteria (in this case "…more inbound requests…") would be defined as behaving elastically. However, the environment would need to be setup in the first place, so that it would be able to react to either vertical scaling (more memory/compute etc.) or horizontal scaling (more VM instances etc.)…this would be referred to as its scalability.
In general, Elasticity requires Scalability.