System Design – Building Distributed Cache like Redis, Memcached | System Design Interview Question



System Design – Building Distributed Cache like Redis, Memcached | System Design Interview Question

System Design - Building Distributed Cache like Redis, Memcached | System Design Interview Question

Caching is one of the most important component of any distributed system you build. There will be only a handful of systems which do not need cache for their working. Otherwise, almost every system needs to put in cache at some point of time. If not in the beginning because of less scale, then definitely later in the stage when they scale.

In this video, I am going to talk about how to build a distributed cache. A distributed cache is a kind of cache which is spread across multiple nodes. It scales horizontally so that it can handle high load.

We are going to fulfil 4 functional requirements in our cache:
1. Putting a key-value pair in the cache.
2. Getting a value for a given key.
3. Cache eviction – What happens when cache becomes full and you want to store new value?
4. Key expiry (also called as TTL – Time to live) – Key is valid only for some time and after that it expires.

Other non-functional requirements which are also targeted here:
1. Availability: Cache should be available for handling the get and put requests.
2. Scalability: Cache should be able to higher load.

Link of some other videos I referenced in this video:
Hashing: https://youtu.be/29_xflQpPaU
Consisten Hashing: https://youtu.be/NwqsAN2SpFQ
Partitioning: https://youtu.be/D_euMOSIRAw
Other helpful system design videos: https://www.youtube.com/playlist?list=PL564gOx0bCLouDCUMtmj6hMEu1JS7QYEr

You can follow me on:
LinkedIn: http://linkedin.com/in/anomaly2104
Instagram: https://www.instagram.com/anomaly2104
Facebook: https://www.facebook.com/anomaly2104
Twitter: https://twitter.com/anomaly2104
Blog: http://blog.uditagarwal.com

#systemdesign #system #distributed #distributedsystem #architecture #software #cache #partitioning #distributedcache #redis #memcached #caching #invalidation #writethrough #readthrough #design #programming #developer #sde #lru

Comments are closed.