Practice
1. A microservice calls a downstream service that occasionally fails or responds slowly. To prevent cascading failures and allow quick recovery, which component should be introduced?
easy
Solution
Step 1: Identify failure containment mechanism
Retries alone (A) can worsen cascading failures by increasing load; load balancers (C) distribute load but don't prevent failures; message queues (D) buffer but don't stop calls to failing services.Step 2: Recognize circuit breaker role
Circuit breakers (B) detect failure thresholds and open to stop calls, preventing cascading failures and allowing recovery.Final Answer:
Option A -> Option AQuick Check:
Circuit breaker stops calls after failures to prevent cascade [check]
Hint: Circuit breaker stops calls after failures to prevent cascade [OK]
Common Mistakes:
2. In the deployment system request flow, at Step 4 the Canary Controller evaluates metrics from the new version. What happens if error rates exceed the threshold at this step?
easy
Solution
Step 1: Understand Step 4 role
At Step 4, Canary Controller monitors metrics to decide if rollout continues or aborts.Step 2: Analyze error threshold breach
If error rates exceed threshold, rollback is triggered to prevent faulty version promotion.Final Answer:
Option B -> Option BQuick Check:
Canary Controller triggers rollback on error threshold breach [check]
Hint: Canary aborts rollout and rolls back on high error rates [OK]
Common Mistakes:
3. At 10x scale, which component in a circuit breaker-enabled microservice architecture is most likely to fail first, and why?
hard
Solution
Step 1: Analyze scaling impact on components
Downstream service (A) is protected by circuit breaker; load balancer (C) scales horizontally; client cache (D) is local and less critical.Step 2: Identify circuit breaker state store bottleneck
Centralized state store for circuit breaker metrics faces contention and latency at 10x concurrency, causing delays and incorrect breaker states.Final Answer:
Option B -> Option BQuick Check:
Centralized circuit breaker state store bottlenecks first at scale [check]
Hint: Centralized circuit breaker state store bottlenecks first at scale [OK]
Common Mistakes:
4. At 10x scale, which component in a real-time chat system is most likely to fail first and why?
hard
Solution
Step 1: Identify stateful bottleneck at scale
WebSocket connections are stateful and bound to specific chat servers, limiting horizontal scaling.Step 2: Compare other components
Databases and queues can be sharded or scaled horizontally; load balancers can be scaled with proxies.Final Answer:
Option C -> Option CQuick Check:
Stateful WebSocket servers limit scaling more than DB or queues [check]
Hint: Stateful WebSocket servers block scaling before DB or queues [check]
Common Mistakes:
5. At 10x scale, which component in the search ranking system is most likely to fail first and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Model Serving can be horizontally scaled; A/B controller logic is lightweight; Kafka partitions can be increased.Step 2: Identify Feature Store bottleneck
Feature Store must serve millions of low-latency reads with consistency, saturating memory bandwidth and cache, making it the first to fail.Final Answer:
Option D -> Option DQuick Check:
Feature Store memory bandwidth saturates first at 10x scale [check]
Hint: Feature Store memory bandwidth saturates before compute or routing [check]
Common Mistakes:
