---
title: "Monitoring URLs that test function, not just uptime"
language: en
topics: ["cloud", "data", "iOS", "server", "watch", "web", "work"]
full_article_url: https://willem.com/en/2021-02-02_realtime-service-uptime-monitoring/
---
# Monitoring URLs that test function, not just uptime

*A harmless database query catches deeper problems than a ping.*

> I implement special URLs on my web services that run a common but harmless function, such as a simple database query. If that endpoint succeeds, the server is online and the key backend systems respond correctly.

The simplest uptime check only asks: is it there? If a server does not respond to a request, you know there is a problem. But deeper faults pass that test, because a server can answer while a key system behind it is broken.
A more refined setup has multiple checks touching different parts of your infrastructure. I add monitoring endpoints that perform a common function, for example a simple database query. When the test succeeds I know two things at once: the server is online and the database responds correctly. The uptime monitor requests these URLs and verifies the outcome.
Design the endpoints to be as efficient as possible. Performing a query is fine, but do not push the server hard, because a monitoring URL gets requested very often.
