Practice
1. In the digital wallet system's transaction processing flow, at Step 4 the Ledger Service applies the debit and credit entries. What happens if the Ledger Service detects a mismatch in the double-entry records at this step?
easy
Solution
Step 1: Understand Ledger Service's double-entry validation
The Ledger Service enforces double-entry consistency; mismatches indicate data corruption or bugs.Step 2: Evaluate failure handling
Retrying indefinitely (A) risks blocking; ignoring mismatch (C) breaks accounting; deleting entries (D) risks data loss. Marking failed and alerting (B) enables safe manual reconciliation.Final Answer:
Option B -> Option BQuick Check:
Mismatch triggers failure mark and alert -> safe reconciliation [check]
Hint: Mismatch triggers failure mark and alert, not silent retry [OK]
Common Mistakes:
2. A notification system must handle 1 million notification writes per second and fan out to millions of devices asynchronously. Which component best decouples the write load from delivery workers to ensure durability and scalability?
easy
Solution
Step 1: Identify the role of the message queue
Kafka provides durable, partitioned logs that decouple producers from consumers, enabling high write throughput and ordered delivery per user.Step 2: Evaluate other options
Relational DB polling (A) can't handle 1M writes/sec efficiently; Redis (C) lacks durability and persistence guarantees; synchronous HTTP (D) blocks on delivery and doesn't scale.Final Answer:
Option D -> Option DQuick Check:
Kafka partitions by user ID -> durable, ordered fan-out [check]
Hint: Kafka partitions decouple writes from delivery at scale [check]
Common Mistakes:
3. Without the automated rollback system, what exactly breaks when a misconfiguration causes a route leak?
medium
Solution
Step 1: Trace failure without rollback
Misconfigurations propagate incorrect routes; without rollback, manual detection delays fix.Step 2: Eliminate other failure modes
Silent drops (A) don't occur; automatic quarantine (C) would cause total outage, not typical; alert floods (D) don't prevent traffic misrouting.Final Answer:
Option D -> Option DQuick Check:
Manual fix delays cause prolonged incorrect routing [check]
Hint: No rollback means manual fix delays outages [check]
Common Mistakes:
4. If the Bloom filter component is removed from the system, what exact failure occurs during key lookups?
medium
Solution
Step 1: Understand Bloom filter removal impact
Without Bloom filters, no pre-filtering occurs, so all lookups go to backend.Step 2: Analyze failure modes
Backend overload (A) is possible but not guaranteed. Increased latency (B) is true but not a failure mode. False positives (D) come from Bloom filters, not their absence. False negatives (C) occur if system relies on Bloom filter to avoid missing keys.Final Answer:
Option B -> Option BQuick Check:
Without Bloom filter, system risks missing keys due to no probabilistic filtering [check]
Hint: No Bloom filter means missing keys, false negatives appear [check]
Common Mistakes:
5. At 10x scale, which component in the distributed API rate limiter is most likely to fail first and why?
hard
Solution
Step 1: Analyze component scalability
Edge caches store counters in memory per user; memory is limited and grows with user count.Step 2: Compare bottlenecks
Logging (A) can be scaled with partitioning; Distributed Counter (C) sharding mitigates hot spots; API gateway (D) scales horizontally. Edge caches (B) hit memory limits first, causing eviction or failures.Final Answer:
Option D -> Option DQuick Check:
Edge caches fail first due to fixed local memory limits [check]
Hint: Edge caches limited by memory, fail before scalable components [check]
Common Mistakes:
