Practice
Solution
Step 1: Identify feature retrieval requirements
Low latency and consistency for millions of users require fast, precomputed feature access.Step 2: Evaluate component suitability
A relational DB with joins (A) is too slow for real-time; batch recomputation (C) is stale; key-value store without consistency (D) risks stale or inconsistent features. Distributed in-memory feature store (B) provides fast, consistent retrieval.Final Answer:
Option B -> Option BQuick Check:
In-memory feature store -> low latency, consistent features [check]
Solution
Step 1: Identify the latency cause
High latency is due to repeated database reads causing load spikes, which read replicas help but still hit the database.Step 2: Recognize caching benefits
An in-memory cache like Redis serves repeated reads from memory, drastically reducing latency and database load.Final Answer:
Option A -> Option AQuick Check:
Cache serves repeated reads faster than replicas [check]
Solution
Step 1: Understand cache failure impact
Without the cache, the API Gateway cannot track usage accurately, often defaulting to conservative rate limit errors to protect backend.Step 2: Evaluate other options
Silent drops cause user confusion; bypassing limits risks overload; automatic fallback to DB rate limiting is rare and slow.Final Answer:
Option A -> Option AQuick Check:
Cache failure -> conservative rate limit errors -> user impact [check]
Solution
Step 1: Analyze Delivery Worker scalability
Delivery Workers are CPU and thread-bound; increasing scale requires more workers, but thread limits and resource contention cause bottlenecks.Step 2: Compare other components
Relational DB (A) can be sharded; push gateways (C) are rate-limited but can be scaled with multiple credentials; presence cache (D) can be sharded with consistent hashing.Final Answer:
Option A -> Option AQuick Check:
Delivery Workers hit thread and CPU limits first at 10x scale [check]
Solution
Step 1: Analyze Kafka broker bottlenecks at scale
Kafka brokers face partition leader overload and disk I/O saturation as event volume grows 10x.Step 2: Compare other components
Flink scales with more nodes; OLAP stores can shard; dashboards scale horizontally; Kafka's broker disk and network limits are hardest to scale first.Final Answer:
Option A -> Option AQuick Check:
Kafka broker disk I/O saturates first at 10x event volume [check]
