Practice
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's presence TTL
If TTL expired, recipient is considered offline; message cannot be delivered immediately.Step 2: Check Delivery Worker behavior on expired TTL
Delivery Worker deletes message from active queue to avoid indefinite retries; offline delivery handled elsewhere.Final Answer:
Option C -> Option CQuick Check:
Expired presence TTL -> message deleted from active delivery queue [check]
Solution
Step 1: Evaluate synchronous recomputation
Monolithic synchronous (A) causes high latency and poor scalability.Step 2: Compare batch vs streaming
Streaming (C) offers freshness but is complex and costly at scale; client-side (D) lacks data for quality recommendations.Step 3: Select batch precompute
Batch jobs (B) balance freshness and scalability by precomputing and caching recommendations.Final Answer:
Option C -> Option CQuick Check:
Batch precompute caches recommendations for scalable freshness [check]
Solution
Step 1: Identify proxy role for exposing internal services
A reverse proxy sits in front of internal servers, hides their details, and can terminate SSL for external clients.Step 2: Eliminate other options
Forward proxies act on clients, not servers; transparent proxies don't modify requests; DNS proxies only resolve names, not handle SSL or hide servers.Final Answer:
Option A -> Option AQuick Check:
Reverse proxy hides servers and terminates SSL [check]
Solution
Step 1: Evaluate fixed window and global approaches
Global fixed window (A) causes unfairness and synchronized spikes; global leaky bucket (D) smooths but penalizes all clients equally.Step 2: Compare per-client token bucket vs fixed quota
Fixed quota (C) disallows bursts, hurting user experience; token bucket (B) allows bursts while enforcing long-term limits, balancing fairness and protection.Final Answer:
Option C -> Option CQuick Check:
Token bucket per client allows controlled bursts [check]
Solution
Step 1: Analyze stateful connection scaling
WebSocket servers maintain stateful connections per user, limiting horizontal scaling due to connection affinity.Step 2: Compare other components' scalability
Relational DB (The relational database storing user progress, due to write contention on user records) can be sharded; CDN (The CDN edge servers, due to bandwidth limits serving video content globally) scales horizontally; Progress Worker (The Progress Worker service, due to single-threaded processing of progress update events) can be parallelized.Final Answer:
Option B -> Option BQuick Check:
WebSocket servers hit stateful connection limits first [check]
