Practice
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]
Solution
Step 1: Trace Delta Upload Worker behavior at Step 4
When the worker finds a chunk hash already stored, it skips re-uploading the chunk to save bandwidth and marks it as present.Step 2: Eliminate incorrect behaviors
Requesting resend wastes bandwidth; deleting existing chunks breaks deduplication; re-chunking is unrelated to upload step.Final Answer:
Option A -> Option AQuick Check:
Delta Upload Worker skips existing chunks to avoid redundant upload [check]
Solution
Step 1: Analyze write frequency and freshness needs
High-read, low-write favors lazy loading and invalidation to avoid cache update overhead.Step 2: Evaluate caching strategies
Write-through adds write latency; write-back risks stale data; cache-aside balances freshness and performance.Final Answer:
Option D -> Option DQuick Check:
Cache-aside suits high-read, low-write with freshness [check]
Solution
Step 1: Identify idempotency store workload at scale
Idempotency store must synchronously write and read keys with strong consistency, creating a high throughput bottleneck.Step 2: Compare other components
Payment processors can be scaled horizontally; API gateways are stateless and scalable; client SDKs generating keys is lightweight.Final Answer:
Option D -> Option DQuick Check:
Synchronous idempotency store writes limit scaling first [check]
Solution
Step 1: Identify bottleneck at 10x scale
Increased lock requests increase network latency and contention on clients acquiring locks.Step 2: Analyze impact on lock acquisition
Higher latency causes clients to miss lock acquisition timeouts, reducing throughput and increasing retries.Step 3: Compare other components
Redis masters scale better with sharding; network links and timers less likely first failure.Final Answer:
Option D -> Option DQuick Check:
Clients hit network latency -> lock timeouts -> first failure at scale [check]
