KCNA ยท Cloud native principles and patterns
Microservices and resilience patterns
Monolith vs microservices, loose coupling, retries, timeouts, circuit breakers, scaling out.
Key points
- A monolith ships as one unit; microservices split it into small, loosely coupled services that deploy and scale independently.
- More network calls means more failure modes, so use timeouts (do not wait forever), retries with backoff (for transient errors), circuit breakers (stop calling a failing dependency) and scale out with more replicas.
Practice questions
What is the main purpose of a timeout on a remote call?
- Bound how long the caller waits so a slow dependency cannot hang it
- Guarantee the call eventually succeeds
- Encrypt the traffic between services
- Increase the number of replicas
Show answer
Answer: A. Bound how long the caller waits so a slow dependency cannot hang it
A timeout bounds waiting so threads and connections are not tied up by a slow dependency. It does not fix the dependency or guarantee success.
Which are typical benefits of microservices over a monolith?
- Deploy each service independently
- Scale only the busy service
- No network latency between components
- Easier end-to-end debugging in one process
- Failures can be isolated to one service
Show answer
Answer: A. Deploy each service independently, B. Scale only the busy service, E. Failures can be isolated to one service
Independent deployment and per-service scaling are core benefits; fault isolation too. Simpler debugging and zero network latency are things a monolith does better.
True or false: retrying failed requests immediately and without limit is a safe way to improve resilience.
Show answer
Answer: False
False. Unbounded instant retries can create a retry storm that overloads a struggling service; use limits, backoff and jitter.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
