Practice
Solution
Step 1: Understand shadow mode request routing
Shadow mode runs new models in parallel without affecting live traffic. So, requests are sent to both models.Step 2: Identify response behavior
Only the production model's prediction is returned to the client; shadow model predictions are logged for evaluation.Final Answer:
Option A -> Option AQuick Check:
Shadow mode duplicates requests but returns production output [check]
Solution
Step 1: Trace cache invalidation at step 4
Cache invalidation is asynchronous and best-effort; failure does not rollback DB writes.Step 2: Understand failure impact on cache state
If invalidation fails, Redis cache remains stale until TTL expiry or next explicit refresh.Final Answer:
Option C -> Option CQuick Check:
Failed cache invalidation -> stale cache until TTL or manual refresh [check]
Solution
Step 1: Identify the protection mechanism against traffic bursts
Distributed cache (A) improves response time but doesn't limit request rate; load balancer (C) distributes load but can't prevent overload from bursts; message queue (D) buffers but can be overwhelmed if bursts are too large.Step 2: Recognize rate limiter role
Rate limiter (B) enforces quotas per client, directly preventing backend overload by rejecting or delaying excess requests.Final Answer:
Option B -> Option BQuick Check:
Rate limiter enforces quotas to prevent overload [check]
Solution
Step 1: Understand backend behavior without rate limiting
Without rate limiting, traffic spikes overwhelm backend, causing resource exhaustion and crashes or unresponsiveness.Step 2: Eliminate incorrect failure modes
Automatic instant scaling (C) is unrealistic; graceful rejection (D) requires rate limiting; queuing all requests (A) leads to resource exhaustion and eventual failure.Final Answer:
Option A -> Option AQuick Check:
Spike without limiter -> backend crash or unresponsiveness [check]
Solution
Step 1: Identify stateful components at risk
Stateful microservices holding WebSocket connections cannot easily shard or move connections, limiting horizontal scaling.Step 2: Compare other components' scaling characteristics
Shared DB and service discovery can be sharded or cached; API Gateway can be scaled horizontally with load balancers.Final Answer:
Option B -> Option BQuick Check:
Stateful WebSocket connections limit microservices horizontal scaling [check]
