Practice
1. In a distributed database, at Step 4 the coordinator node receives conflicting writes from two partitions during a network split. What state does the coordinator enter immediately after Step 4?
easy
Solution
Step 1: Trace coordinator behavior at Step 4
The coordinator detects conflicting writes from partitions and cannot commit both safely.Step 2: Understand conflict resolution
It marks writes as conflicting and delays commit until partitions heal to avoid inconsistency.Final Answer:
Option A -> Option AQuick Check:
Coordinator defers conflicting writes until partition resolution [check]
Hint: Coordinator delays conflicting writes until partition heals [check]
Common Mistakes:
2. In the timeline generation flow, at step 4 the Delivery Worker reads from Kafka and checks the follower's timeline cache TTL. What happens if the cache TTL has expired for a follower at this step?
easy
Solution
Step 1: Understand Delivery Worker cache TTL check
If TTL expired, the cached timeline is stale and must be rebuilt to ensure fresh data.Step 2: Evaluate actions on expired TTL
Skipping (A) loses data; direct DB write (C) bypasses cache rebuild; retrying cache read (D) causes blocking and delays.Final Answer:
Option A -> Option AQuick Check:
Expired TTL triggers timeline rebuild to maintain freshness [check]
Hint: Expired cache TTL triggers timeline rebuild [check]
Common Mistakes:
3. In a MongoDB data model using the bucket pattern for time-series data, at step 3 of the write flow, the system checks if the current bucket document is full. What happens if the bucket is full at this step?
easy
Solution
Step 1: Understand bucket pattern write flow
Writes append to a bucket document until size or time limits are reached.Step 2: Behavior when bucket is full
System creates a new bucket document to avoid exceeding MongoDB's 16MB document size limit.Final Answer:
Option A -> Option AQuick Check:
New bucket created to respect document size limits [check]
Hint: Full bucket triggers new document creation to avoid size limit [check]
Common Mistakes:
4. In a request trace, at step 4 the latency monitoring component records the request's completion time. If the request took 120ms but the P95 latency threshold is 100ms, what state does the monitoring component mark for this request?
easy
Solution
Step 1: Compare request latency to P95 threshold
The request latency (120ms) exceeds the P95 threshold (100ms), so it is in the slowest 5% tail.Step 2: Monitoring component's marking logic
Requests exceeding P95 latency are flagged to identify performance degradation; it is not ignored or marked as failed unless timeout occurs.Final Answer:
Option C -> Option CQuick Check:
120ms > 100ms P95 -> marked as exceeding P95 latency [check]
Hint: Latency > P95 threshold -> mark as slow request [OK]
Common Mistakes:
5. At 10x scale, which component of a distributed HyperLogLog-based unique user counting system is most likely to fail first, and why?
hard
Solution
Step 1: Analyze scaling impact on components
Network bandwidth is low since only fixed-size sketches are transferred, not raw IDs; register size is fixed and does not fail but accuracy degrades slightly.Step 2: Identify bottleneck
The aggregator merges many sketches concurrently, increasing CPU load and latency, making it the first to fail under 10x load.Final Answer:
Option A -> Option AQuick Check:
Aggregator CPU-bound merging many sketches first bottleneck [check]
Hint: Aggregator CPU merges many sketches -> first bottleneck [check]
Common Mistakes:
