Caching
All interview questions related to Caching
In a high-traffic microservices system using a distributed cache, how do you handle cache invalidation without breaking consistency?
Explain different caching strategies and their trade-offs for high-performance applications.
Design a globally available URL shortener like TinyURL/Bitly. Cover API design, key generation, storage, redirects, analytics, abuse prevention, and scalability.
Design a globally distributed rate limiter for multi-region APIs supporting per-user, per-IP, and per-endpoint quotas.
Design a personalized news feed for a social network with billions of events per day. Cover write fan-out vs read fan-out, ranking, and cold start.
Design an autocomplete service that suggests queries as users type, with personalization and typo tolerance.
Design a highly available checkout/cart system handling flash sales, inventory reservations, payments, and order confirmation.
Design a low-latency feature flag platform with targeting rules, audit logs, and mobile/edge delivery.
Design a federated GraphQL gateway that composes multiple subgraphs, with caching, authorization, and schema evolution.
Design a multi-tenant API gateway that handles routing, auth, rate limiting, request/response transformations, canarying, and observability across regions.
Design a recommendations system (e.g., βpeople you may knowβ or product recs) with offline training, nearline updates, and real-time ranking.
Design a distributed cache that supports eviction policies, consistency across nodes, replication, and client-side failover.
Design a global CDN for static and dynamic content delivery, cache invalidation, SSL termination, and DDoS protection.
A cache eviction triggers a surge of requests to the origin, causing overload. How do you diagnose and prevent cache stampede?
Users report that data they just wrote is not visible when reading immediately. Outline your investigation and mitigation.
A misconfigured deployment invalidates most CDN cache objects at once, flooding the origin. Whatβs your triage and prevention plan?