A maintenance window is a stretch of time agreed in advance for work that can interrupt a service: a deployment, a database migration, a server restart, a certificate or DNS change. People who depend on the service are told when it starts and how long it should last.
The point of the window is that the interruption is expected. That separates it from an outage, which nobody planned.
Planned and unplanned downtime
| Planned downtime | Outage | |
|---|---|---|
| Announced beforehand | Yes | No |
| Cause | Deliberate work | A failure |
| Usually counted against an availability promise | Often not, if the agreement excludes it | Yes |
Whether planned work counts against uptime depends on the agreement. Many SLAs exclude announced maintenance, and some limit how much of it is allowed. Read the contract rather than assuming.
What visitors should see
During the window the service should say what is happening instead of failing silently. A common choice is to answer with HTTP 503 and, where possible, a Retry-After header that says when to come back. See How to Investigate an HTTP 503 Error.
Monitoring during a window
A monitor does not know about your plans unless you tell it. Without a window, planned work looks like a real outage and raises alerts. With one, the monitor keeps checking and keeps the results, but treats the period differently.
In UptimeWire a planned maintenance window for a website works like this:
- Checks keep running and the history shows the failures.
- Incident alerts that begin inside the window are held. If the outage ends inside the window, they are cancelled. If it runs past the end, they are sent when the window ends.
- The time inside the window is left out of the uptime calculation.
- Warnings about the SSL certificate, the domain, and DNS are not held by the window.
A window has to be set up ahead of time, and limits apply to its length and number. It is a tool for work you announce, not a way to hide an outage. More in Why Uptime Monitors Send False Alerts.