# caching & performance
// [26] real interview questions. Answers and sources live in the practice app.
practice this topic- When is a cache not useful, or even dangerous?(senior)
- Which principles would you apply to define the size of a cache?(senior)
- Explain the difference between RDB and AOF persistence in Redis. When would you choose each?(mid)
- How do you handle atomic operations in Redis when multiple clients update the same data?(mid)
- How should you structure Redis keys for maintainability and performance?(junior)
- What is pipelining in Redis, and when would you use it?(mid)
- How would you implement a simple counter in Redis, for example for page views or a rate limit?(junior)
- Describe the Pub/Sub model in Redis. What are the disadvantages of publish-subscribe at scale?(mid)
- Scale out vs scale up: how are they different, and when do you apply each?(mid)
- How do you deal with failover and user sessions? A server dies mid-session — what does the user experience, and how do you design so they notice nothing?(senior)
- How would you design a software system for scalability?(senior)
- How could a denial of service arise not from an attack, but from a design or architectural problem?(senior)
- What is the C10k problem, and how did servers evolve to handle tens of thousands of concurrent connections?(senior)
- When would you apply asynchronous communication between two systems instead of a synchronous call?(mid)
- Why does event-driven architecture improve scalability?(mid)
- Compare the caching strategies: cache-aside, read-through, write-through, write-behind, refresh-ahead.(mid)
- Cache eviction: LRU vs LFU vs FIFO — and what does Redis actually do when memory runs out?(mid)
- How does a CDN work, what's the difference between push and pull CDNs, and what belongs on one?(mid)
- Message queue vs event stream — RabbitMQ vs Kafka semantics — and how do you choose?(senior)
- What is backpressure, and what actually happens to a system that has none?(senior)
- Explain the circuit breaker pattern: the three states, and why it beats naive retrying.(mid)
- What are the safe rules for timeouts and retries when calling downstream services?(mid)
- Redis beyond strings: match each data type to the use case it was built for.(mid)
- Storing objects in Redis: hash per object, separate keys per field, or one JSON string — how do you choose?(mid)
- You built a job queue with Redis lists (LPUSH + BRPOP). What can go wrong, and when do you move to Redis Streams?(mid)
- When you open a site for the second time it appears almost instantly, while the first visit spun for a while. What is the browser reusing under the hood, and how does it decide a stored copy is still safe to serve?(mid)