Practice
Solution
Step 1: Identify the need for durability and ordering
Relational DB synchronous writes (Use a relational database with immediate synchronous writes for each vote) cause high latency and don't scale to 1M writes/sec. Redis without persistence (Use an in-memory cache like Redis without persistence to handle votes) risks data loss on failure. Batch processing (Use a batch processing system that aggregates votes every hour) introduces unacceptable latency.Step 2: Recognize Kafka's role
Kafka provides durable, ordered, high-throughput buffering of vote events, decoupling ingestion from processing.Final Answer:
Option D -> Option DQuick Check:
Kafka buffers high-write streams with durability and ordering [check]
Solution
Step 1: Analyze memory and false positive trade-offs
A single global Bloom filter grows large and has higher false positive rates due to keyspace size; partitioning per shard reduces filter size and localizes false positives.Step 2: Evaluate alternatives
Counting Bloom filters allow deletions but consume more memory, which is costly at large scale; caching recent keys does not guarantee absence and can miss cold keys.Final Answer:
Option B -> Option BQuick Check:
Partitioned Bloom filters balance memory and false positives at scale [check]
Solution
Step 1: Understand gossip failure impact
Without membership updates, nodes are unaware of failed nodes and continue routing requests to them.Step 2: Eliminate other failure modes
Vector clocks handle versioning, unrelated to gossip failure. Consistent hashing ring updates rely on membership info but do not fail immediately. Write blocking on quorum is unrelated to gossip propagation.Final Answer:
Option B -> Option BQuick Check:
Missing membership updates cause requests to failed nodes causing timeouts [check]
Solution
Step 1: Understand Redis unavailability impact
Without Redis, the centralized counter is unreachable, so rate limiting cannot be enforced.Step 2: Check fallback behavior
Most implementations allow requests to proceed without rate limiting to avoid blocking, risking overload.Final Answer:
Option A -> Option AQuick Check:
Redis down -> no rate limiting -> requests allowed unchecked [check]
Solution
Step 1: Analyze scaling bottlenecks
Model Serving can be horizontally scaled; A/B controller logic is lightweight; Kafka partitions can be increased.Step 2: Identify Feature Store bottleneck
Feature Store must serve millions of low-latency reads with consistency, saturating memory bandwidth and cache, making it the first to fail.Final Answer:
Option D -> Option DQuick Check:
Feature Store memory bandwidth saturates first at 10x scale [check]
