HTTP 503 Service Unavailable: What It Means and When You See It
Quick Answer
HTTP 503 Service Unavailable means the server is temporarily unable to handle requests — usually due to maintenance or overload. Retry-After may be present.
HTTP 503 vs 502 vs 504
HTTP 502 Bad Gateway: the upstream returned an invalid response. HTTP 503 Service Unavailable: the server is temporarily unable to handle requests (overloaded or in maintenance). HTTP 504 Gateway Timeout: the upstream is too slow or unresponsive (no response within timeout). For 503: the server is up but refusing requests. For 504: the server is reachable but the upstream is not responding in time. Use Retry-After with 503 to tell clients when to retry.
Implementing 503 Gracefully
For planned maintenance: intercept at the load balancer or CDN level (Cloudflare maintenance page, nginx error_page 503). Return Retry-After: 3600 (seconds) so clients know when to retry. For health checks: return 503 when the database is unavailable: if (!db.isConnected()) return res.status(503).json({ error: "Service unavailable" }). Kubernetes uses 503 when pods are not ready (failing readiness probe). CDNs cache 503 for a short time - set Cache-Control: no-store on 503 responses.
Try the interactive tool
Convert any value instantly — no sign-up required
Frequently Asked Questions
Related Values
100
HTTP 100 Continue means the server has received the request headers and the client should proceed to send the request body. It is an interim response used to inform the client to continue.
101
HTTP 101 Switching Protocols indicates the server is switching to the protocol specified in the Upgrade header field. Commonly used when upgrading to WebSocket connections.
200
HTTP 200 OK is the standard success response. The request has succeeded and the server has returned the requested resource in the response body.
201
HTTP 201 Created means the request succeeded and a new resource was created as a result. The Location header typically points to the new resource URL.