Practice
Solution
Step 1: Trace Indexer behavior at step 3
The Indexer updates the inverted index with terms from the batch and retains batch metadata for consistency and fault tolerance.Step 2: Eliminate incorrect states
Deleting raw documents immediately risks data loss. PageRank runs after indexing, not before. Re-parsing is triggered by errors, not term frequency.Final Answer:
Option A -> Option AQuick Check:
Indexer updates index and keeps metadata for consistency [check]
Solution
Step 1: Trace offset commit role at Step 4
Offset commit marks messages as processed; if not committed, Kafka considers them unprocessed.Step 2: Understand crash impact
If consumer crashes before commit, on restart it reprocesses messages from last committed offset, causing duplicates.Final Answer:
Option A -> Option AQuick Check:
Uncommitted offsets cause message reprocessing [check]
Solution
Step 1: Understand WebSocket failure behavior
When the WebSocket server crashes, the TCP connection closes, and clients receive a close event.Step 2: Trace message delivery impact
Messages sent during downtime are lost unless the application implements retries. Clients must reconnect manually or via client logic. There is no automatic buffering or fallback to Long Polling.Final Answer:
Option C -> Option CQuick Check:
WebSocket crash -> connection close event, no automatic buffering [check]
Solution
Step 1: Understand Bloom filter removal impact
Without Bloom filters, no pre-filtering occurs, so all lookups go to backend.Step 2: Analyze failure modes
Backend overload (A) is possible but not guaranteed. Increased latency (B) is true but not a failure mode. False positives (D) come from Bloom filters, not their absence. False negatives (C) occur if system relies on Bloom filter to avoid missing keys.Final Answer:
Option B -> Option BQuick Check:
Without Bloom filter, system risks missing keys due to no probabilistic filtering [check]
Solution
Step 1: Analyze stateful vs stateless components at scale
Relational DB (The relational database storing user profiles, due to increased read queries) can be scaled with read replicas; Kafka (The Kafka cluster, due to partition leader election delays under heavy load) scales well with partitions. Ranking cache (The ranking service's in-memory cache, because it cannot shard scores by post_id effectively) can shard by post_id.Step 2: Identify WebSocket server bottleneck
WebSocket servers hold stateful connections bound to server memory; these connections cannot be moved easily, limiting horizontal scaling and causing failures under 10x load.Final Answer:
Option C -> Option CQuick Check:
Stateful WebSocket servers fail first due to unshardable live connections [check]
