0
0
Microservicessystem_design~5 mins

Liveness and readiness probes in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a liveness probe in microservices?
A liveness probe checks if a service is alive and running. If it fails, the system restarts the service to fix it.
Click to reveal answer
beginner
What does a readiness probe do?
A readiness probe checks if a service is ready to accept traffic. If it fails, the service is removed from load balancing until ready.
Click to reveal answer
intermediate
Why use both liveness and readiness probes together?
Using both helps keep services healthy and only sends traffic to services that are ready, improving reliability and user experience.
Click to reveal answer
beginner
Give a simple example of a liveness probe check.
A liveness probe might send an HTTP GET request to "/healthz" endpoint. If it returns 200 OK, the service is alive.
Click to reveal answer
intermediate
What happens if a readiness probe fails continuously?
The service stops receiving new requests but keeps running. This prevents sending traffic to a service that can't handle it yet.
Click to reveal answer
What is the main purpose of a liveness probe?
ATo balance load between services
BTo check if the service is alive and restart if needed
CTo monitor network latency
DTo check if the service is ready to accept traffic
If a readiness probe fails, what happens?
AThe service is removed from load balancer and stops receiving traffic
BThe service is restarted immediately
CThe service shuts down
DNothing happens
Which probe helps avoid sending traffic to a service that is not ready?
ALiveness probe
BLoad balancer
CStartup probe
DReadiness probe
What is a common method used by liveness probes to check service health?
AMeasuring disk space
BChecking CPU usage
CSending an HTTP GET request to a health endpoint
DVerifying user login
Why is it important to have both liveness and readiness probes?
ATo restart services and manage traffic properly
BTo increase CPU usage
CTo reduce network bandwidth
DTo log user activity
Explain the difference between liveness and readiness probes in microservices.
Think about when a service should be restarted versus when it should just stop receiving traffic.
You got /4 concepts.
    Describe a real-life scenario where readiness probes improve user experience.
    Imagine a restaurant kitchen not ready to serve but still open.
    You got /4 concepts.