Practice
Solution
Step 1: Understand Update Worker hashing
Each hash function maps the event key to an index in the sketch array.Step 2: Increment counter at hashed index
The Count-Min Sketch increments the counter at that index to record the event occurrence.Final Answer:
Option B -> Option BQuick Check:
Update increments counters at hash indices to track frequencies [check]
Solution
Step 1: Understand BM25 reliance on DF
BM25 scoring depends on accurate document frequency to weigh term rarity; stale DF skews scores.Step 2: Trace impact of stale DF at Ranking Component
Ranking uses stale DF directly, leading to inaccurate relevance scores and suboptimal document ordering; no automatic fallback or query rejection occurs.Final Answer:
Option D -> Option DQuick Check:
Stale DF causes inaccurate BM25 scores and ranking errors [check]
Solution
Step 1: Identify the filtering requirement
The system needs a fast, memory-efficient way to filter out keys that definitely do not exist before hitting the slow backend.Step 2: Evaluate component suitability
Redis cache storing all keys (A) is expensive and not scalable for huge key sets. Relational DB indexes (C) still require backend queries. Consistent hashing (D) routes keys but does not filter non-existent keys. Bloom filters (B) provide fast probabilistic membership tests with low memory.Final Answer:
Option A -> Option AQuick Check:
Bloom filters reduce backend queries by filtering non-existent keys [check]
Solution
Step 1: Analyze ledger database constraints
Ledger DB enforces strong consistency and atomic double-entry transactions, limiting sharding options.Step 2: Compare other components
Reconciliation (A) can be scaled asynchronously; API gateway (C) can be scaled with stateless design; Kafka (D) scales with partitioning but ledger DB consistency is harder to scale.Final Answer:
Option D -> Option DQuick Check:
Ledger DB consistency limits sharding -> first bottleneck [check]
Solution
Step 1: Identify stateful WebSocket connections on chat servers
Each connection binds to server memory, limiting horizontal scaling flexibility.Step 2: Analyze scaling challenges
Chat servers cannot easily move existing connections; adding servers doesn't reduce existing server load.Step 3: Compare other components
Databases can shard; load balancers scale horizontally; message queues can add partitions.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket servers bottleneck scaling due to connection affinity [check]
