Skip to content

Uptime

What an uptime check does, when your app counts as down and as up again, when you are told, and what differs between the engine and Sypnia Cloud.

Applies to EngineCloud
View as Markdown
On this page
  1. What a check does
  2. Down, and up again
  3. When you are told
  4. Engine and Cloud
  5. What uptime does not do
  6. Example: the shop at night
  7. Reference

This page is for anyone who wants to be told when their app stops answering. Uptime checks are part of the open-source engine. Sypnia Cloud runs them from more than one place and sends the alert by e-mail.

Everything else in Sypnia is reported by your app. If your app is down, it reports nothing, and silence looks like a quiet day. An uptime check is the answer to that: Sypnia asks your app, from outside, whether it is there.

What a check does

An uptime check is a request the engine makes to an address of yours, on a schedule.

DefaultYou can change it to
The requestAn HTTP GET to the address you give, such as https://yourapp.com/ or https://yourapp.com/api/health.HEAD, and up to 10 headers of your own. Headers are stored and shown as you send them, so do not put secrets there.
How oftenEvery minute.Every 5 or 15 minutes.
Time allowed10 seconds.Between 1 and 30 seconds.
It passes whenThe answer arrives in time and its status is between 200 and 399.One status, a range or a list. And, for a GET, a text the answer must contain in its first 256 KB.

A check fails when the answer is late, has another status, lacks the text you asked for, or never comes: the name cannot be resolved, the connection is refused, or the certificate is not valid.

For each request Sypnia keeps the time, whether it passed, the status code or the reason it failed, and how long the answer took.

Every check follows up to 3 redirects, never sends cookies, and names itself with the header User-Agent: Sypnia-Uptime/1.0, so you can recognise it in your logs. It only calls public addresses: an address inside a private network is refused, unless you allow it on your own engine.

A check belongs to a project, not to an environment. Its requests are not events and do not count towards a plan’s events.

Down, and up again

One failed request is not an outage. Networks hiccup.

  • A check is down after two failures in a row. That moment opens an outage.
  • A check is up again after one success. That closes the outage.

An outage runs from the first of the two failures to the first success. Its length is what Sypnia reports as downtime.

Uptime over a period is the share of the check’s requests that passed in it. With a check every minute, thirty failed requests in a day are 97.9 % uptime for that day.

Single results are kept for 7 days. After that Sypnia keeps the numbers of each hour, for 400 days: how many requests, how many failed, and how long the answers took.

When you are told

Going down and coming back each create an alert. Uptime alerts do not wait for anything else in Sypnia. With a check every minute, the alert arrives about two minutes after your app stops answering. The number of failures that makes the alert, two, can be changed in the project’s alert rules.

AlertSays
DownWhich check, since when, and why: the status code, or «no answer within 10 seconds», or the certificate or name error.
Up againWhich check, and how long it was down.

How the alert reaches you is in Alerts and the daily summary. A check that is still down creates no further alerts until it comes back. You can pause a check, for example during planned maintenance; a paused check makes no requests and creates no alerts.

Engine and Cloud

The Sypnia engine and Sypnia Cloud compared
Sypnia engineOpen source, self-hostedSypnia CloudPaid service, with a free tier
Where the check runs fromFrom where your engine runs: one place.From three regions.
When a check failsWhen the request from that one place fails.When at least two of the three regions fail. One region with a network problem does not count.
How you are toldThe alert is recorded, shown in the Console and sent to your webhooks. No e-mail in the default deployment.By e-mail and inside the app, and to your webhooks. Each e-mail counts towards the plan's alert e-mails a month; past that, the alert is still shown in the app and sent to webhooks.
How many checks50 for each project by default. The number is yours to change.Set by the plan; on Team you can add more. See Plans and limits.

What uptime does not do

A check cannot warn you before a certificate expires, and Sypnia has no public status page for your app. See Limits for what to use instead.

Example: the shop at night

The shop has one check on https://yourapp.com/api/health.

TimeCheckState
03:11200 in 180 msUp
03:12No answer within 10 secondsStill up. One failure.
03:13503Down. Two failures in a row. The outage starts at 03:12. An alert goes out: «Your app stopped answering at 03:12: no answer within 10 seconds.»
03:14 to 03:23503Down. No new alert.
03:24200 in 240 msUp. An alert goes out: «Your app is answering again. It was down for 12 minutes.»

In the morning, the daily summary on Sypnia Cloud says the app was down for 12 minutes during the night, instead of «Your app answered all day».

Reference

Creating and reading checks: the API reference. On a self-hosted engine, what must be running for checks to be made is in the self-hosting overview.

  1. What a check does
  2. Down, and up again
  3. When you are told
  4. Engine and Cloud
  5. What uptime does not do
  6. Example: the shop at night
  7. Reference

    Search pages, sections and terms