Design a Distributed Cache
viaGlassdoor
Requirements: Design a distributed cache system that can scale across multiple nodes while remaining fast and reasonably consistent.
Design: Partition keys across cache nodes using consistent hashing to minimize rebalancing when nodes join/leave. Support an eviction policy per node (LRU/LFU) with a capacity limit. Address replication for fault tolerance (e.g. each key replicated to N nodes), cache invalidation strategy (write-through vs write-back vs write-around), and how clients discover the correct node for a key (a coordinator service or client-side consistent-hash routing). Discuss consistency tradeoffs (eventual vs strong) and how hot keys are handled to avoid a single node becoming a bottleneck.
asked …