An API health check is a small, automated request that asks your API whether it can do its job, and raises an alert when the answer is no or does not arrive. The checks that earn their keep have two halves: a health endpoint inside your service that reports honestly on what it depends on, and an outside monitor that calls it, and your real endpoints, on a schedule from several locations. We built Funny Monitors for the second half, so this guide covers both: what to build, what to test and how to turn failures into alerts you will act on.
Key Takeaways
- Split health into a shallow liveness check (is the process responsive?) and a deeper readiness check (can it serve requests?). Never point liveness at a database.
- A health endpoint that returns 200 does not prove your business endpoints work. Monitor a real user journey from outside as well.
- Keep checks cheap, time-limited and cached, or the health check itself becomes a source of load and outages.
- Alert on symptoms users feel, confirm failures over consecutive checks and from more than one location, and review checks whenever dependencies change.
- Our website and API monitoring runs the external half for you, with alerts and status pages included.
Table of Contents
- What an API health check actually does
- Liveness, readiness and dependency checks
- What your health check should test
- Designing the endpoint without adding risk
- Interpreting failures and setting alerts
- Keeping checks honest over time
- Monitoring health checks continuously and connecting them to your tools
- Set up external API monitoring with Funny Monitors
- FAQ
- Sources
What an API health check actually does
Microsoft’s Azure Architecture Center describes health endpoint monitoring as a simple loop. A monitoring tool sends a request to an endpoint on the application. The application runs its own checks and returns a status. The tool measures how long that took and judges the status code, the response content and the response time against the success criteria you configured. Those results drive alerts and, in larger systems, automatic remediation such as taking an unhealthy instance out of the traffic rotation.
That last point matters for who is reading what. Inside a platform, a load balancer or orchestrator uses health checks to decide where traffic goes. Outside it, a monitoring service uses them to decide whether to wake a human. The same endpoint can serve both, but the questions are different, and mixing them up is the root of most bad health checks.
A useful check covers four things:
- Availability: does the endpoint answer at all?
- Functionality: does a specific request return the expected response?
- Performance: how long does the answer take?
- Errors: are failures logged so you can see why?
That breakdown is the one Tyk’s guide to API health checks uses, and it is a good checklist for judging any setup you inherit.
Liveness, readiness and dependency checks
Most confusion disappears once you separate three questions.
Liveness: is the process alive? A shallow check confirms the service can respond without contacting downstream systems. Microsoft’s pattern recommends shallow checks for liveness so that a dependency outage does not trigger needless restarts.
Readiness: can it do useful work right now? A deep check verifies the dependencies the service cannot work without, such as its primary database. Optional dependencies are left out.
Synthetic checks: does the whole journey work? These call real endpoints from outside, the way a customer’s app would. API7’s comparison of health-check methods lists liveness, readiness, dependency checks, synthetic end-to-end checks and gateway checks, and says most production systems need a combination rather than a single probe.

Why liveness must stay shallow
A liveness probe that queries the database looks sensible and is a trap. If the database has a bad minute, every instance fails its liveness check, the orchestrator restarts them all, and a dependency blip becomes a full outage. A November 2026 post-mortem on a health check that kept returning 200 makes the same point: liveness should only test things a restart can fix, such as a deadlock or a wedged event loop.
The peer-reviewed paper Proactive monitoring design patterns for cloud-native applications adds a related rule: liveness endpoints must reply without side effects, and monitors need an initial delay before they start probing. Applications take time to start, and a monitor that restarts a service mid-startup creates an endless restart loop.
What your health check should test
A practical way to decide what belongs in the deep check is to classify each dependency by what breaks for users if it fails. API7’s guidance sorts them like this:
- Dependencies needed to serve any request belong in the readiness check.
- Dependencies behind a single feature should not make the whole instance unready. Track them with feature-level metrics and let that feature degrade.
- Third-party or rate-limited services should be watched with bounded synthetic checks, not probed by every instance.
- Diagnostic-only dependencies stay out of routing checks entirely.
OneEnv’s dependency-aware aggregation design turns this into three labels. A hard dependency, such as the primary database, makes the service unhealthy when it fails. A soft one, such as a recommendations service or a cache, makes it degraded. An informational one, such as an analytics exporter, changes nothing. The article suggests returning 200 for both healthy and degraded and 503 only when a hard dependency is down, so a load balancer does not pull capacity that could still serve most requests.
A worked example
Take a small online shop with an API for orders, built by a freelance developer. Its dependencies are a Postgres database, a Redis cache, a payment provider and an email service.
| Dependency | Label | What happens on failure |
|---|---|---|
| Postgres | Hard | Readiness fails, status 503 |
| Redis cache | Soft | Status reports degraded, still 200 |
| Payment provider | Soft or hard, depending on whether orders can be taken without it | Watched by an external synthetic check, not probed per instance |
| Email service | Informational | Logged, no effect on status |
The payment provider is the interesting row. Probing it from every instance every few seconds is wasteful and may breach its rate limits. One external monitor calling a lightweight endpoint once a minute tells you what you need.
A 200 is not proof the business works
Nurbak’s guide to building a health endpoint warns that a health check can return 200 while a business endpoint such as /api/checkout returns 500, because the health check never exercises business logic. This is the strongest argument for monitoring from outside. Your own endpoint reports what your code believes. An external check calls what your customers call. For the shop above, that means one monitor on the health endpoint and another on a real read endpoint, such as a product listing, with the expected status code and response time defined. Our note on synthetic monitoring explains how this fits alongside simple uptime checks.
Designing the endpoint without adding risk
A health endpoint runs constantly, so its design matters more than its size. The sources agree on a short list of habits.
- Use two paths. ASOasis recommends separate /health/live and /health/ready endpoints, with an optional startup path, as GET requests at predictable, non-versioned paths. Its suggested targets are a 95th-percentile latency under 50 ms for liveness and 200 ms for readiness.
- Use meaningful status codes. The same article suggests 200 for healthy, 503 for not ready and 500 when the checker itself fails.
- Return a small, stable body. A short JSON object that names each check and its result helps whoever is on call. Keep it minimal and redacted: do not leak hostnames, versions or connection strings to the public internet.
- Give every dependency check a timeout. Nurbak suggests a timeout per dependency and a total response under three seconds. The MobileByteSensei post-mortem uses explicit 500 ms timeouts and recommends checking that a connection pool has spare capacity, not just that the database answers a trivial query, because a database can be reachable while the pool is exhausted.
- Name the failing check in the body. At 3 am, “unhealthy” is useless and “cache: timeout” is a starting point.
- Make the check configurable. The ACM paper lists check interval, timeout, consecutive-failure count and initial delay as the settings a monitor should expose.
Keep the check from becoming the load
It is easy to forget how many things call a health endpoint. Iurii Rogulia’s Node.js health-check write-up shows a load balancer every 10 seconds, a monitor every minute and an autoscaler all hitting the same deep check, generating steady background database load. His fix is to cache the result for a few seconds (5 seconds when healthy, 2 when degraded, none when unhealthy), so a load balancer checking every 10 seconds touches the real dependencies at most twice a minute per instance. The trade-off is that a failure can go unseen for up to the cache lifetime, which sits comfortably inside normal failure-threshold buffers.
The other trap is fan-out. OneEnv calculates that if each service deep-checks three dependencies and the chain is three levels deep, one probe triggers 3 + 9 + 27 = 39 downstream calls. Each service should report only its direct dependencies, and a separate aggregator should poll each service on a fixed interval.
Interpreting failures and setting alerts
A health check is only as good as the decision it triggers. Here the evidence is thinner on specifics, but one principle is well established. Google’s SRE book chapter on monitoring distributed systems says a healthy alerting pipeline is simple and focuses on symptoms for paging, keeping cause-oriented signals as debugging aids. Translated for a small team: page someone when users cannot get a valid response, not when one instance’s CPU is at 80%.
A sensible starting rule set looks like this:
- Confirm before you page. Require two or three consecutive failures before alerting. One failed request is often a network blip. APISIX’s own documentation shows the principle in an active health check configuration: a node is marked healthy after one success and unhealthy after two failures.
- Check from more than one location. If three regions fail, your API is down. If one region fails, you may have a routing problem near that probe. Multi-location monitoring is how you tell the difference.
- Alert on speed as well as errors. A response that takes eight seconds is an outage for many clients even if it eventually returns 200. Set a response-time threshold per endpoint.
- Match the channel to the urgency. A degraded cache can go to email or a team chat. A hard-down payment endpoint should reach a phone by SMS or voice.
- Say what a failure means. Each alert should link to a short note: which dependency, who owns it and the first thing to try.
Reading the pattern of failures
| What you see | Likely meaning | First move |
|---|---|---|
| Health endpoint 503, business endpoints fine | A readiness dependency is failing but traffic is still served, or the check is too strict | Read the failing check in the body |
| Health endpoint 200, business endpoint 500 | Application logic or a feature dependency is broken | Check recent deployments and logs for that route |
| Timeouts from every location | API or network edge is down | Treat as an outage and update your status page |
| Failures from one location only | Regional routing or provider issue | Watch for confirmation before paging |
| Slow but successful responses | Saturation or a slow dependency | Check connection pools and downstream latency |
Tell your users, too
When an outage is confirmed, the quickest way to stop a flood of support emails is a public or private status page that shows which part is affected. Status page announcements let you post an incident and its updates in one place instead of replying one customer at a time.
Keeping checks honest over time
Checks decay. Services gain dependencies, traffic patterns shift and a check that was well calibrated a year ago starts crying wolf or, worse, stops noticing real problems. Meta’s 2026 paper on health checks for safe deployments calls this drift. Over a year of improvements to check quality, including dependency-aware checking, the authors report cutting the fleet-wide false-positive rate from 12.1% to 2.7%. That is a very large operation, but the lesson scales down: treat checks as code that needs maintenance.
Three habits are enough for a small team:
- Give every dependency a label and an owner. OneEnv suggests reviewing criticality labels whenever the call graph changes, for example as a pull-request checklist item.
- Review alerts after every incident. Did the check fire early enough? Did it fire for something nobody cared about? Change one threshold each time.
- Add a check when you add a feature. A new checkout step or webhook receiver deserves its own monitor on day one.
Monitoring health checks continuously and connecting them to your tools
Inside your platform, health checks often feed metrics. The APISIX tutorial shows a Prometheus plugin exposing an upstream status gauge (1 for healthy, 0 for unhealthy), which a dashboard can scrape. That tells you what your gateway thinks. It does not tell you whether a customer outside your network can reach you, and it goes quiet if the whole environment goes down with it.
So run both. Internal metrics explain why something failed. An external monitor tells you that it did, from the customer’s side of the internet, even when your own tooling is down. For a freelancer looking after several client APIs, or an IT team without a dedicated on-call rota, the external monitor is the part worth outsourcing: it needs no infrastructure of your own and still works when yours does not. Our uptime monitoring for DevOps teams page covers the integration side, and our API and webhooks let you connect monitors to the rest of your workflow.
Set up external API monitoring with Funny Monitors

We offer subscription monitoring for websites, APIs, ping, ports, TCP, domains and SSL certificates, with real-time incident detection, alerts by email, SMS and voice, team integrations, maintenance windows, and customisable public or private status pages. Status pages, integrations and the API are included in the monitoring service, and multi-location monitoring and polling data show how often each monitor is checked.
Plans are published in pounds: Starter is £5.00 a month or £48.00 a year, Pro is £15.00 a month or £144.00 a year, and Business is £50.00 a month or £480.00 a year. Enterprise plans are available too. SMS and voice credits and additional notification seats are optional extras. You can compare plans on the pricing page, or look at the Starter plan if you are monitoring a single product or a handful of client sites.

A good first setup takes minutes: one monitor on your health endpoint, one on your most important customer-facing endpoint, alerts to email for warnings and SMS or voice for confirmed outages, and a status page ready for the day you need it. If you also want to know about certificates before they cause errors, SSL expiry monitoring covers that.
FAQ
What is an API health check?
It is an automated, periodic request that tests whether an API endpoint or service is working and raises an alert if it is not. It can be a simple reachability test or a deeper check of the database, cache and other dependencies the API needs.
What is the difference between a liveness and a readiness check?
A liveness check asks whether the process is running and responsive, and should avoid contacting external dependencies. A readiness check asks whether the service can handle traffic now, so it verifies the dependencies it cannot work without. Microsoft’s health endpoint pattern recommends shallow checks for the first and deep checks for the second.
How often should an API health check run?
Once a minute is a common rhythm for an external monitor, while load balancers inside a platform often check every few seconds. Whatever the interval, set a timeout, require consecutive failures before alerting, and cache deep-check results so frequent callers do not overload your dependencies.
Should a health endpoint be public?
The endpoint your monitor calls must be reachable from outside, but its response should stay minimal and redacted. Return a status and the name of each check, and never expose versions, hostnames or connection details.
Is a 200 response enough to prove my API works?
No. A health endpoint can return 200 while a real endpoint such as checkout fails, because it may not exercise business logic. Add an external monitor on a real customer-facing endpoint with an expected status code and response time.
Sources
- Health Endpoint Monitoring Pattern, Microsoft Azure Architecture Center
- API health checks: How to keep apps healthy, Tyk
- API Health Check Methods and Best Practices, API7
- The health check that returned 200 while the service was down, MobileByteSensei
- Proactive monitoring design patterns for cloud-native applications, ACM
- Microservice Health Check Aggregation: Dependency-Aware Design, OneEnv
- API Health Check Endpoint: Build It Right (2026), Nurbak
- Designing Production-Grade REST API Health Check Endpoints, ASOasis
- Liveness vs Readiness in a Node.js Health Check Endpoint, Iurii Rogulia
- Monitoring Distributed Systems, Google SRE book
- Monitor API Health Check with Prometheus, Apache APISIX
- Making Deployments Safe at Meta: Health Checks, arXiv