Practice
Solution
Step 1: Identify failure isolation mechanism
Asynchronous message queues decouple services, buffering requests and preventing direct cascading failures during outages.Step 2: Evaluate alternatives
Synchronous REST calls (A) cause blocking and cascading failures; monolithic DB (C) is a single point of failure; direct TCP (D) lacks buffering and backpressure.Final Answer:
Option C -> Option CQuick Check:
Async queues buffer and isolate failures, limiting blast radius [check]
Solution
Step 1: Understand sequence number role in Snowflake
The sequence number differentiates IDs generated within the same millisecond on the same machine.Step 2: Analyze overflow handling
If the sequence exceeds its max (e.g., 4095), the generator must wait for the next millisecond to avoid duplicates. Resetting immediately (A) risks duplicates; wrapping (C) causes collisions; incrementing machine ID (D) is not part of the design.Final Answer:
Option A -> Option AQuick Check:
Sequence overflow -> wait next millisecond to avoid duplicates [check]
Solution
Step 1: Understand Kafka's role in feature ingestion
Kafka streams feature updates to the store, enabling near real-time freshness.Step 2: Trace failure impact
If Kafka is down, streaming ingestion halts. The system falls back to batch recomputation to update features, causing delays. Training cannot proceed with partial or dropped features without risking data quality.Final Answer:
Option B -> Option BQuick Check:
Kafka outage triggers batch fallback, delaying freshness [check]
Solution
Step 1: Analyze query router bottleneck
Query routers are typically stateless or use connection pooling; they scale horizontally well, so (A) is less likely.Step 2: Evaluate inverted index storage nodes
As index size grows 10x, random disk seeks increase non-linearly, causing latency spikes and throughput degradation, making (B) the primary bottleneck.Step 3: Consider indexing workers and Kafka
Indexing workers and Kafka scale with partitioning and parallelism, so (C) and (D) are secondary bottlenecks.Final Answer:
Option A -> Option AQuick Check:
Disk seek latency grows fastest, limiting index node throughput [check]
Solution
Step 1: Identify stateful bottleneck in synchronous chat
Chat servers maintain WebSocket connections statefully, binding clients to specific servers.Step 2: Analyze scaling challenges
At 10x scale, resharding or migrating these stateful connections is complex, causing chat servers to fail first.Final Answer:
Option D -> Option DQuick Check:
Stateful WebSocket servers limit horizontal scaling, causing early failure [check]
