Graceful Shutdown
AI Cost Firewall supports graceful shutdown on SIGTERM and SIGINT.
Sequence
- Signal received.
/readyzreturns503.- New requests are rejected.
- In-flight requests complete.
- Process exits after
graceful_shutdown_timeout_seconds.
graceful_shutdown_timeout_seconds 10;
Rejection response
{
"error": {
"code": 503,
"message": "server is shutting down",
"type": "service_unavailable"
}
}
Metrics
aif_inflight_requests
aif_shutdown_in_progress
aif_shutdown_rejections_total