Skip to main content

Practice ยท 2 of 3

Liveness vs Readiness

Write healthZ(state) and readyZ(state) โ€” state is { crashed: bool, dbUp: bool, cacheUp: bool }. healthZ: 503 only when crashed (liveness = process alive; dependencies do not matter). readyZ: 200 only when dbUp AND cacheUp (readiness = can serve correctly). Return numbers.

Difficulty: intermediate

Back to lesson: Practice: Observability & Incidents โ€” Practice