Practice
1. A payment gateway must reliably process millions of payment requests per second and ensure durability despite transient failures. Which component is best suited to decouple the payment request ingestion from downstream processing to achieve this?
easy
Solution
Step 1: Identify the role of the decoupling component
The component must provide durability and handle high throughput without blocking the ingestion path.Step 2: Evaluate Kafka's suitability
Kafka provides a distributed, durable log with partitioning and replication, enabling asynchronous processing and replay.Final Answer:
Option A -> Option AQuick Check:
Kafka decouples ingestion and processing with durability and scale [check]
Hint: Durable logs decouple ingestion from processing [check]
Common Mistakes:
2. A system must handle millions of short video uploads per day, ensuring fast ingestion and metadata extraction without blocking the user. Which component is best suited to decouple upload ingestion from processing?
easy
Solution
Step 1: Identify ingestion decoupling need
Relational DB (A) blocks user upload due to synchronous writes; CDN (C) caches for delivery, not ingestion; REST API (D) triggers blocking transcoding.Step 2: Choose buffering component
Kafka (B) buffers uploads asynchronously, enabling fast user response and reliable processing.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers uploads asynchronously for scalable ingestion [check]
Hint: Buffer uploads asynchronously with Kafka queue [OK]
Common Mistakes:
3. For a system launching with unpredictable hot keys, which cache warming strategy balances freshness and resource usage best?
medium
Solution
Step 1: Analyze warming strategies for unpredictable hot keys
Hybrid approach uses historical and real-time data to adaptively warm relevant keys.Step 2: Eliminate extremes
Preloading all keys wastes resources; ignoring recent changes misses new hot keys; lazy loading causes latency.Final Answer:
Option A -> Option AQuick Check:
Hybrid warming adapts to traffic changes balancing freshness and cost [check]
Hint: Hybrid warming adapts to traffic changes balancing freshness and cost [check]
Common Mistakes:
4. For ranking posts in a Reddit-like system with millions of votes per minute, which architecture better balances real-time freshness and scalability?
medium
Solution
Step 1: Evaluate synchronous centralized DB approach
Use a single centralized database to compute ranking scores on every vote synchronously causes write bottlenecks and high latency, unsuitable for millions of votes per minute.Step 2: Compare streaming vs batch and client-side
Batch (Use batch jobs every hour to recompute rankings from raw vote data) has high latency, unsuitable for real-time freshness. Client-side (Use client-side ranking computation to reduce server load) can't guarantee consistent global ranking. Streaming pipeline (Use a streaming pipeline (Kafka + Flink) to incrementally update scores asynchronously) provides near real-time incremental updates and scales horizontally.Final Answer:
Option A -> Option AQuick Check:
Streaming pipelines enable scalable, near real-time ranking updates [check]
Hint: Streaming pipelines scale and update rankings near real-time [check]
Common Mistakes:
5. A team must decide between using a detailed blame-focused report or a blameless timeline with action items for their post-mortem. Which approach is best for fostering continuous improvement in a high-trust engineering culture?
medium
Solution
Step 1: Evaluate cultural impact of blame vs blameless approaches
Blame-focused reports create fear and reduce openness, harming continuous improvement.Step 2: Assess effectiveness of blameless timelines with action items
They foster trust, encourage learning, and drive actionable improvements aligned with high-trust culture.Final Answer:
Option A -> Option AQuick Check:
Blameless + action items -> continuous improvement [check]
Hint: Blameless + action items build trust and improve systems [check]
Common Mistakes:
