Practice
Solution
Step 1: Understand Feed Generator error handling
Discarding (A) loses data silently; pausing and retrying (B) blocks the pipeline indefinitely; crashing (D) causes system downtime.Step 2: Dead-letter queue usage
Sending malformed messages to a dead-letter queue (C) isolates bad data for manual or automated inspection without blocking the main pipeline.Final Answer:
Option A -> Option AQuick Check:
Dead-letter queue isolates bad messages without blocking processing [check]
Solution
Step 1: Trace backend server health check at Step 4
If the backend server health check fails, it should not process the request (The backend server processes the request anyway, risking errors is incorrect). Returning an error directly to the client (The backend server returns an error response directly to the client) bypasses the load balancer's retry logic. The load balancer retrying without backend signaling (The load balancer retries routing the request to a different healthy backend) is incomplete.Step 2: Understand backend rejection and signaling
The backend server rejects the request and signals the load balancer to reroute traffic to a healthy backend (The backend server rejects the request and signals the load balancer to reroute), ensuring availability.Final Answer:
Option A -> Option AQuick Check:
Backend signals load balancer to reroute on health check fail [check]
Solution
Step 1: Analyze latency and update frequency constraints
High volume requires low latency for common intents and flexibility for complex queries.Step 2: Evaluate architectures
A single large LLM (A) has high latency and update overhead. Multiple replicas (C) improve throughput but still synchronous latency is high. Batch offline (D) delays updates and user experience. Lightweight classifier with async LLM fallback (B) balances fast routing and complex understanding.Final Answer:
Option C -> Option CQuick Check:
Lightweight classifier + async LLM fallback balances latency and accuracy [check]
Solution
Step 1: Analyze memory constraints and burst tolerance
Sliding window counters require storing timestamps, which grows with request volume, unsuitable for strict memory limits.Step 2: Fixed window counters use constant memory by counting requests per fixed interval, allowing bursts at window edges but fitting memory constraints
Token and leaky buckets smooth bursts but require token state management and may not tolerate bursts as well.Final Answer:
Option D -> Option DQuick Check:
Fixed window uses constant memory, tolerates bursts, fits strict memory limits [check]
Solution
Step 1: Identify stateful components at scale
Driver assignment maintains WebSocket connections, which are stateful and tied to server memory.Step 2: Analyze scaling bottlenecks
WebSocket connections cannot be easily sharded or moved; adding servers doesn't migrate existing connections, causing resource exhaustion.Step 3: Compare other components
Databases (A) can be sharded; caches (C) can evict; notification services (D) can batch or retry.Final Answer:
Option C -> Option CQuick Check:
Stateful WebSocket connections -> driver assignment service bottleneck [check]
