503Status code
5xxServer error
NoCacheable by default
RFC 9110 §15.6.4Defined in
Common causes
- Planned maintenance
- Overload
- All backend instances unhealthy
What to do
Send Retry-After. For maintenance, 503 tells search engines not to drop your pages.
Example response
HTTP/1.1 503 Service Unavailable
Retry-After: 120
Content-Type: application/json
{"error":"service unavailable"}
Returning 503 in code
Express res.status(503).json({ … });
Flask return jsonify(…), 503
PHP http_response_code(503);
Go w.WriteHeader(503)
nginx return 503;