Caching hard
Facebook's McRouter supports 'Shadowing'. What use case does this enable?
- A Hiding sensitive PII data.
- B Safely validating a new cache pool configuration by asynchronously replaying production traffic to it, without affecting real user responses.
- C Creating a hot standby for high availability.
- D Double-writing to DB and Cache.
Answer: B. Safely validating a new cache pool configuration by asynchronously replaying production traffic to it, without affecting real user responses.
**Shadowing** (or Traffic Mirroring) copies incoming production traffic and sends it to a test cluster *asynchronously*, ignoring the test cluster's response. This allows engineers to test new cache configurations, versions, or capacity limits under real-world load patterns without risking the stability of the live user experience.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In the Cache-Aside pattern, what happens when the application requests data that is missing from the cache (a 'Cache Miss')?
- Why use a centralized Distributed Cache (like a Redis Cluster) over local in-memory caches on each web server?
- Setting a short TTL (e.g., 60 seconds) on a cached object helps to:
- What is the primary architectural goal of introducing a cache into a system?
- Most caching systems rely on the principle of 'Temporal Locality', which states:
- Your cache uses an LRU (Least Recently Used) eviction policy. When the cache is full, which item is removed?