Scalability concepts

Jolly srivastava
System Design Concepts
2 min readNov 23, 2020

Prerequisite: What is scalability? Why is it require? Different types of scalibilty?https://medium.com/@jollysrivastava0896/a-word-on-scalability-3ef7a3c5452

In this blog i am trying to explain what it would take to make a web service massively scalable?

Clones: As we are aware that in any web service servers are hidden behind load balancers. This load balancer distributes load to our group/cluster of application servers. Now it may happen that user1 may get served by server1 on his first interaction and server2 on his second and back with server1 on the third interaction. User1 should always get the same result irrespective of what server user1 landed on.

Every server should share the same codebase and does not store any user related data like session or profile.

Therefore, the session should be stored in a centralized database that is accessible to all the servers. Now this database can be an external database or external persistent cache like Redis.

Here external persistent cache is a better idea as it will drastically improve the performance compared to an external database. External persistent cache i.e a cache where data is being persisted but the cache is not part of the application server but is somewhere near to the data center our application server is. ( Refer to part-ii of this blog for better understanding)

Deployment can be taken care of by creating an image file from one of these servers known as AMI (Amazon machine image) by AWS. Whenever one starts a new instance/clone, initial deployment of the latest code is required and we are ready to go!!

In the upcoming blogs, I will be sharing details about databases, cache, and asynchronism.

--

--