0
0
Microservicessystem_design~20 mins

Liveness and readiness probes in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Probe Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Difference between liveness and readiness probes

Which statement correctly describes the difference between liveness and readiness probes in microservices?

ALiveness probes are used only during deployment; readiness probes are used only during runtime.
BLiveness probes check if the service is ready to accept traffic; readiness probes check if the service is alive and should be restarted if failed.
CBoth probes check if the service is alive but readiness probes run more frequently.
DLiveness probes check if the service is alive and should be restarted if failed; readiness probes check if the service is ready to accept traffic.
Attempts:
2 left
💡 Hint

Think about what happens when a service is unhealthy versus when it is not ready to serve requests.

Architecture
intermediate
2:00remaining
Choosing probe types for a microservice

You have a microservice that loads a large configuration file on startup and then serves requests. Which probe setup is best to ensure smooth traffic routing and automatic recovery?

AUse a readiness probe that checks if the configuration is loaded, and a liveness probe that checks if the service process is running.
BUse only a liveness probe that checks if the configuration is loaded.
CUse only a readiness probe that checks if the service process is running.
DUse a liveness probe that checks if the service is ready to accept traffic, and no readiness probe.
Attempts:
2 left
💡 Hint

Consider what happens if the service is running but not ready to serve requests.

scaling
advanced
2:00remaining
Impact of probe misconfiguration on scaling

What is the likely impact if a readiness probe is misconfigured to always fail in a Kubernetes deployment with autoscaling?

APods will be restarted repeatedly, causing instability in the cluster.
BPods will never receive traffic, causing autoscaler to create more pods unnecessarily.
CPods will receive traffic even if unhealthy, causing errors for users.
DAutoscaler will scale down pods aggressively, reducing availability.
Attempts:
2 left
💡 Hint

Think about how readiness affects traffic routing and autoscaling decisions.

tradeoff
advanced
2:00remaining
Tradeoffs in probe frequency settings

What is a tradeoff when setting very frequent liveness and readiness probe intervals in a microservice?

AHigher probe frequency improves failure detection speed but increases CPU and network overhead.
BHigher probe frequency reduces CPU usage but delays failure detection.
CLower probe frequency causes more false positives but reduces network traffic.
DLower probe frequency improves failure detection speed but increases memory usage.
Attempts:
2 left
💡 Hint

Consider what happens when probes run too often versus too rarely.

estimation
expert
2:30remaining
Estimating probe impact on cluster resource usage

A Kubernetes cluster runs 100 microservice pods. Each liveness probe sends a 1KB HTTP request every 10 seconds, and each readiness probe sends a 1KB HTTP request every 5 seconds. Estimate the total network bandwidth used by probes per minute.

A3600 KB per minute
B2400 KB per minute
C1800 KB per minute
D3000 KB per minute
Attempts:
2 left
💡 Hint

Calculate requests per pod per minute, multiply by request size and number of pods.