Lesson 5 — Health checks
Is the service OK?
A health check is a small function (usually a URL like /health) that answers "is this service working?". Monitoring tools call it every few seconds and raise an alarm when the answer is no. The decision combines signals such as CPU load and error count: all must be fine.
cpu < 90 && errors === 0 // && means "and"
Note: real DevOps tools (CI servers, load balancers, Docker, Kubernetes) cannot run in your browser, so this exercise is a small plain-JS simulation of the logic those tools use.
Why it matters: you learn about problems from your monitor, not from angry users.
Return true only if cpu < 90 and errors === 0 and memory < 80.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
A quick 3-question quiz on this lesson — instant feedback.