Designing a distributed cache
We will now design a distributed cache. Let’s start by noting down the requirements and then creating a high-level diagram with all the components. We will then go into a detailed design hashing out the inner workings of the components.
Requirements
Thinking about the requirements for the distributed cache, we can categorize them into two areas: functional and non-functional requirements.
The following are the functional requirements:
pu
t(key, value): We should be able to add a key and value pair to the cacheget
(key): Given the key, we should be able to fetch the corresponding value
The following are the non-functional requirements:
- Highly performant: The system should deliver fast and efficient access to cached data, providing low-latency responses and high throughput. Performance is a critical aspect of distributed caching, especially in scenarios where quick access to frequently used data is essential for...