5. You design a microservices system where Service A calls Service B, which calls Service C. Service C is unstable and often fails. Which design improves overall system stability best?
hard
A. Make Service A call Service C directly to reduce hops
B. Add retries with limits and fallback in Service B for calls to Service C
C. Remove retries to avoid extra load on Service C
D. Combine Services B and C into one to avoid network calls
Solution
Step 1: Identify failure point and impact
Service C is unstable, causing failures in the chain.
Step 2: Apply fault tolerance best practices
Retries with limits and fallback in Service B isolate failures and improve stability.
Step 3: Evaluate other options
Direct calls or combining services increase coupling or load; removing retries loses resilience.
Final Answer:
Add retries with limits and fallback in Service B for calls to Service C -> Option B
Quick Check:
Retries + fallback near failure = stability [OK]
Hint: Place retries and fallback close to unstable service [OK]