Microservices Resilience and Fault Tolerance 3 — Questions and Answers
Question 1: What problem does a cascading failure describe in a microservices system?
- A single database query running slowly
- One service's failure propagating and overwhelming dependent services in a chain reaction (Correct answer)
- A failed deployment rollback
- A misconfigured DNS record
Correct answer: One service's failure propagating and overwhelming dependent services in a chain reaction
Cascading failures occur when one overloaded or failing service drags down others that depend on it, spreading the outage.
Question 2: Which technique limits the number of concurrent calls a service will accept to protect itself?
- Rate limiting / concurrency limiting (Correct answer)
- Eager loading
- Schema migration
- Blue-green deployment
Correct answer: Rate limiting / concurrency limiting
Rate or concurrency limiting caps inbound load so a service is not overwhelmed beyond its capacity.
Question 3: What is the 'fail fast' principle in resilient design?
- Always retry until success
- Detect failures quickly and return an error immediately rather than blocking (Correct answer)
- Disable all error logging
- Delay all responses to batch them
Correct answer: Detect failures quickly and return an error immediately rather than blocking
Failing fast returns errors promptly instead of holding resources on doomed calls, keeping the system responsive.
Question 4: When a circuit breaker is in the OPEN state, what happens to incoming requests?
- They are queued until the service recovers
- They are short-circuited and fail immediately (or use a fallback) without calling the downstream (Correct answer)
- They are retried five times each
- They bypass the breaker entirely
Correct answer: They are short-circuited and fail immediately (or use a fallback) without calling the downstream
In OPEN state the breaker rejects calls instantly, giving the failing service time to recover and protecting the caller.
Question 5: Why can aggressive retries make an outage worse?
- They reduce log volume
- They add extra load to an already struggling service, amplifying the problem (Correct answer)
- They always bypass the load balancer
- They encrypt traffic twice
Correct answer: They add extra load to an already struggling service, amplifying the problem
Retries against a degraded service pile on more requests, increasing load and potentially deepening the outage.
Question 6: What is a health check endpoint used for in resilient microservices?
- Generating API documentation
- Letting orchestrators and load balancers detect unhealthy instances and route around them (Correct answer)
- Encrypting database credentials
- Compiling the application
Correct answer: Letting orchestrators and load balancers detect unhealthy instances and route around them
Health checks let platforms like Kubernetes restart or stop routing to instances that report unhealthy.
Question 7: What distinguishes a liveness probe from a readiness probe in Kubernetes?
- They are identical in function
- Liveness decides whether to restart a container; readiness decides whether to send it traffic (Correct answer)
- Liveness checks the database; readiness checks the CPU
- Readiness restarts pods; liveness load balances
Correct answer: Liveness decides whether to restart a container; readiness decides whether to send it traffic
A failing liveness probe triggers a container restart, while a failing readiness probe removes the pod from service endpoints.
What problem does a cascading failure describe in a microservices system?