Practice
Solution
Step 1: Trace Ranking Service behavior at step 4
Ranking Service combines candidate suggestions with personalization data; if missing, it must still return relevant results.Step 2: Evaluate fallback strategies
Blocking for personalization data (C) causes latency; empty results (A) degrade UX; querying Trie again (D) is unrelated. Falling back to global popularity ranking ensures responsiveness.Final Answer:
Option C -> Option CQuick Check:
Ranking Service fallback -> global popularity ranking [check]
Solution
Step 1: Understand HNSW index rebuild behavior
HNSW index rebuilds asynchronously; during rebuild, queries use the last consistent snapshot.Step 2: Analyze worker behavior at Step 4
The ANN Search Worker returns results from the previous stable index snapshot, so stale but consistent results are served.Final Answer:
Option A -> Option AQuick Check:
HNSW queries serve last snapshot during rebuild, avoiding blocking [check]
Solution
Step 1: Identify latency and loss tolerance requirements
Live video streaming prioritizes low latency and can tolerate some packet loss, so retransmission delays are undesirable.Step 2: Match protocol characteristics
UDP provides minimal overhead and no retransmission, fitting low latency needs. TCP guarantees delivery but adds delay due to retransmissions and congestion control.Final Answer:
Option A -> Option AQuick Check:
UDP suits low-latency, lossy streaming [check]
Solution
Step 1: Analyze real-time analytics requirements
High throughput and near real-time aggregation require decoupling ingestion and processing.Step 2: Evaluate architectures
Kafka streaming (B) supports scalable event ingestion and asynchronous processing; relational DB (A) can't handle high write load; flat files (C) have high latency; NoSQL eventual consistency (D) may cause stale reads.Final Answer:
Option A -> Option AQuick Check:
Kafka decouples ingestion and processing for scalable real-time analytics [check]
Solution
Step 1: Evaluate WebSocket vs gRPC streaming for mobile clients
gRPC streaming is efficient but poorly supported on many mobile platforms; WebSocket is widely supported with heartbeat to detect disconnects.Step 2: Consider fallback mechanisms
WebSocket with push notification fallback handles intermittent connectivity better than long polling or MQTT, which have higher overhead or complexity.Final Answer:
Option B -> Option BQuick Check:
WebSocket + push fallback balances latency and mobile constraints [check]
