Practice
1. For a CDN serving frequently updated dynamic content, which origin content delivery strategy is best to ensure freshness without overloading the origin server?
medium
Solution
Step 1: Analyze push vs pull for dynamic content freshness
Push model can overload origin with frequent updates; polling adds unnecessary load.Step 2: Evaluate pull with TTL caching
Pull with TTL balances freshness and origin load by caching briefly and refreshing on expiry.Final Answer:
Option A -> Option AQuick Check:
Pull with TTL caching balances freshness and origin load [check]
Hint: Pull with TTL balances freshness and load [check]
Common Mistakes:
2. If the Kafka cluster responsible for fan-out message delivery crashes, what is the exact failure observed in the News Feed system?
medium
Solution
Step 1: Understand Kafka's role in fan-out delivery
Kafka acts as a durable queue for fan-out messages. If it crashes, Delivery Workers cannot fetch new messages, causing stale feeds.Step 2: Evaluate failure modes
Posts are not lost immediately (A) due to Kafka's durability; writes are asynchronous so no blocking (B); duplicates (D) occur only on replay, not crash.Final Answer:
Option D -> Option DQuick Check:
Kafka crash stalls delivery, causing stale feeds [check]
Hint: Kafka crash stalls delivery, causing stale feeds [check]
Common Mistakes:
3. For a chat system requiring low latency and fault tolerance, which architecture is best when mobile clients have intermittent connectivity?
medium
Solution
Step 1: Evaluate client connectivity constraints
Mobile clients have intermittent connectivity; gRPC streaming (A) requires persistent connections, which mobile networks may not support well. HTTP long polling (D) causes overhead and latency.Step 2: Compare WebSocket with server buffering vs polling
WebSocket with server-side buffering and reconnection (C) balances low latency and fault tolerance better than client polling (B), which increases latency and load.Final Answer:
Option C -> Option CQuick Check:
WebSocket + buffering + reconnection -> best for intermittent mobile [check]
Hint: WebSocket buffers and reconnects for flaky mobile networks [check]
Common Mistakes:
4. For a system ingesting high-frequency IoT sensor data with strict latency requirements, which architecture is better and why?
medium
Solution
Step 1: Analyze latency and ingestion frequency requirements
High-frequency data with strict latency requires near real-time processing to avoid stale metrics.Step 2: Compare architectures
Batch processing (A) introduces high latency unsuitable for real-time needs. Storing raw data only (C) delays insights and burdens query engines. Relational DBs (D) struggle with high write throughput and time-series data volume. Stream processing (B) supports continuous, low-latency windowed aggregations.Final Answer:
Option A -> Option AQuick Check:
Stream processing enables low-latency, continuous aggregation [check]
Hint: Stream processing fits low-latency, high-frequency IoT data [check]
Common Mistakes:
5. If the CDN's cache invalidation mechanism fails to propagate updates, what is the exact failure experienced by end users?
medium
Solution
Step 1: Understand cache invalidation failure impact
Failure to propagate invalidation means cached content remains stale beyond intended update.Step 2: Identify user experience as stale content served until TTL expiry
Users see outdated data until cache naturally expires or is manually cleared.Final Answer:
Option B -> Option BQuick Check:
Cache invalidation failure -> stale content served, not errors or overload [check]
Hint: Invalidation fails -> stale content served until TTL expires [OK]
Common Mistakes:
