Practice
Solution
Step 1: Identify the role of the decoupling component
The component must provide durability and handle high throughput without blocking the ingestion path.Step 2: Evaluate Kafka's suitability
Kafka provides a distributed, durable log with partitioning and replication, enabling asynchronous processing and replay.Final Answer:
Option A -> Option AQuick Check:
Kafka decouples ingestion and processing with durability and scale [check]
Solution
Step 1: Trace the atomic INCR operation
At Step 3, the Redis INCR command increments the counter regardless of limit.Step 2: Check limit enforcement logic
If the incremented counter exceeds the limit, the request is rejected but the counter remains incremented to reflect the attempt.Final Answer:
Option B -> Option BQuick Check:
Counter increments atomically; request rejected if limit exceeded [check]
Solution
Step 1: Analyze component scalability
Edge caches store counters in memory per user; memory is limited and grows with user count.Step 2: Compare bottlenecks
Logging (A) can be scaled with partitioning; Distributed Counter (C) sharding mitigates hot spots; API gateway (D) scales horizontally. Edge caches (B) hit memory limits first, causing eviction or failures.Final Answer:
Option D -> Option DQuick Check:
Edge caches fail first due to fixed local memory limits [check]
Solution
Step 1: Identify bottleneck at scale
Relationship indexes are critical for traversal and often stored as centralized or partially sharded structures.Step 2: Sharding challenge
Relationship indexes are hard to shard due to cross-node edges, causing hotspots and contention under 10x load.Step 3: Compare other components
Storage engines can scale with hardware; query planners optimize but are less likely first bottleneck; network issues are secondary.Final Answer:
Option B -> Option BQuick Check:
Relationship index hotspots cause first failure at 10x scale [check]
Solution
Step 1: Identify stateful components that limit horizontal scaling
The metrics aggregation service maintains counters and error budget state, which are hard to shard without losing accuracy.Step 2: Evaluate other components' scalability
Dashboards (A) are client-side and less critical; Kafka (C) scales well with partitions; alerting (D) can batch and scale horizontally.Final Answer:
Option A -> Option AQuick Check:
Stateful aggregation -> sharding limits -> bottleneck at scale [check]
