educative.io

Configuration Service for distributed cache?

The configuration service suggested in the distributed cache service design has many similarities to a load balancer. Why not use a load balancer?

Hello @James_Baker,
In the lesson you are referring to a load balancer is being used. There is a load balancer layer and then a distributed cache system.
Hope this answers your query

He is not talking about the load balancer in front of clients. What James is talking about is replacing the configuration service with a load balancer.


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Detailed Design of a Distributed Cache - Grokking Modern System Design Interview for Engineers & Managers

I guess I have a similar question, but in my case I would have thought in using a service discovery. I don’t think a load balancer would be suitable in this scenario, as it will just balance the load among the servers, but a service discovery will literally do what you were thinking about: every time a new cache server is added, it will detect it and the cache clients should notice this.

Not sure if a service discovery is missing any point, but I guess they wanted to use a configuration service to make the solution more granular and specific oriented for the requirements of the distributed cache system.


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-modern-system-design-interview-for-engineers-managers/3wn54mPGXmQ


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Detailed Design of a Distributed Cache - Grokking Modern System Design Interview for Engineers & Managers

Hey @Omer_Ahmed, here’s the relevant portion:

use a configuration service that continuously monitors the health of the cache servers. In addition to that, the cache clients will get notified when a new cache server is added to the cluster. When we use this strategy, no human intervention or monitoring will be required in case of failures or the addition of new nodes. Finally, the cache clients obtain the list of cache servers from the configuration service.

I second the original question; it seems like a load balancer would remove the burden on clients to pick servers intelligently, reducing the risk of them picking servers less than intelligently and creating hotspots.