Practice
1. In the job application tracking flow, at step 5 the Application Processor updates the candidate's application status in the database. What happens if the database write at this step fails due to a transient network error?
easy
Solution
Step 1: Understand failure handling at Application Processor
Transient DB errors should not block user workflow or cause permanent failure.Step 2: Evaluate options
Immediate retry blocking (A) hurts latency; skipping update (C) loses data; rolling back entire submission (D) is heavy-handed. Queuing for async retry (B) ensures eventual consistency without blocking.Final Answer:
Option B -> Option BQuick Check:
Async retry decouples transient failures from user flow [check]
Hint: Async retry avoids blocking on transient DB errors [check]
Common Mistakes:
2. A video calling system must establish peer-to-peer connections between clients behind NATs and firewalls. Which component is primarily responsible for enabling this connectivity?
easy
Solution
Step 1: Identify NAT traversal role
STUN/TURN servers help clients discover public IPs and relay media if direct peer-to-peer fails.Step 2: Eliminate other components
Media Server relays media but is not primarily for NAT traversal; Signaling Server handles session negotiation, not media encoding; WebRTC client manages connection but relies on STUN/TURN for NAT traversal.Final Answer:
Option A -> Option AQuick Check:
STUN/TURN enable NAT traversal, essential for peer connectivity [check]
Hint: STUN/TURN servers enable NAT traversal and relay fallback [check]
Common Mistakes:
3. In the DNS resolution chain, at step 4 the recursive DNS server receives a referral response from the root server pointing to a TLD server. What state does the recursive server enter immediately after receiving this referral?
easy
Solution
Step 1: Understand recursive server behavior on referral
When the recursive DNS server receives a referral from the root server, it caches the referral information (the TLD server's IP) and then queries the TLD server itself.Step 2: Eliminate incorrect states
It does not cache the root server IP (already known), nor does it discard the referral or forward it directly to the client. The recursive server handles the full resolution chain transparently.Final Answer:
Option A -> Option AQuick Check:
Recursive server caches referral and queries next server [check]
Hint: Recursive server caches referrals and queries next hop [check]
Common Mistakes:
4. For an API gateway that must limit requests to a steady rate and avoid sudden bursts, which rate limiting approach is best and why?
medium
Solution
Step 1: Analyze burst handling requirements
The system must avoid sudden bursts and enforce steady rate.Step 2: Compare algorithms
Token bucket allows bursts, fixed window counters reset counts causing bursts, sliding window logs allow spikes due to timestamp granularity.Final Answer:
Option C -> Option CQuick Check:
Leaky bucket enforces steady output rate, smoothing bursts [check]
Hint: Leaky bucket smooths bursts; token bucket allows bursts [check]
Common Mistakes:
5. At 10x scale, which component is most likely to fail first in the ticketing system and why?
hard
Solution
Step 1: Identify scaling bottlenecks
Seat Locking Service uses distributed cache to hold locks with TTL, which consumes memory proportional to concurrent locks.Step 2: Analyze 10x scale impact
Memory saturation in cache causes eviction or failures, breaking seat locking guarantees. Payment gateway and DB can be scaled horizontally or sharded; web servers scale with load balancers.Final Answer:
Option A -> Option AQuick Check:
Distributed cache memory limits -> seat lock failures at scale [check]
Hint: Cache memory saturates first under massive concurrent locks [OK]
Common Mistakes:
