Practice
Solution
Step 1: Understand key distribution and node churn
Modulo hashing fails when nodes change, causing massive remapping; centralized directory adds bottleneck.Step 2: Consistent hashing with virtual nodes
This approach evenly distributes keys and minimizes remapping on node changes by mapping keys and nodes on a hash ring.Final Answer:
Option D -> Option DQuick Check:
Consistent hashing minimizes remapping on node changes [check]
Solution
Step 1: Evaluate persistent connection options
gRPC streaming is efficient but less supported on mobile platforms and can drain battery.Step 2: Compare WebSocket and polling
WebSocket supports bidirectional communication with reconnection and heartbeats, balancing real-time and battery use better than polling.Final Answer:
Option A -> Option AQuick Check:
WebSocket balances real-time updates and mobile constraints [check]
Solution
Step 1: Analyze latency and throughput requirements
Real-time updates require low latency and high throughput, which batch processing (Batch processing of job and user data nightly with offline model training) and manual curation (Manual curation of job recommendations updated weekly by content teams) cannot provide.Step 2: Compare online feature store vs periodic REST calls
Online feature store with streaming pipelines (Online feature store with streaming data pipelines and real-time model scoring) supports continuous updates and real-time scoring, unlike periodic REST calls (Periodic REST API calls to external recommendation services with caching) which add latency and stale data.Final Answer:
Option B -> Option BQuick Check:
Streaming pipelines + online store -> real-time low latency [check]
Solution
Step 1: Analyze component scalability at 10x load
CDN edge caches (A) scale horizontally and are designed for massive read throughput. Transcoding pipeline (C) can be scaled with more workers. Upload service (D) can be scaled with load balancers and stateless servers.Step 2: Identify view count database bottleneck
View count DB is a centralized write hotspot with high contention and latency sensitivity. At 10x scale, it becomes the first bottleneck due to write amplification and consistency requirements.Final Answer:
Option B -> Option BQuick Check:
Centralized view count DB write bottleneck fails first [check]
Solution
Step 1: Identify component roles at scale
Archive storage uses tape drives with limited concurrent access bandwidth and high latency.Step 2: Analyze scaling challenges
At 10x scale, tape drives become bottleneck due to limited parallelism and slow seek times, unlike metadata which can be sharded.Final Answer:
Option A -> Option AQuick Check:
Archive tape bandwidth limits -> first bottleneck [check]
