Gargi-jais11 commented on code in PR #582: URL: https://github.com/apache/ozone-site/pull/582#discussion_r4356267744
########## docs/04-user-guide/01-client-interfaces/03-s3/01-s3-api.md: ########## @@ -148,6 +196,30 @@ ozone s3 revokesecret -u om/[email protected] -y S3 secret revoked. ``` +## Health check + +The S3 Gateway serves two unauthenticated health endpoints on its web admin server (default port `19878`), separate from the S3 listener (`9878`). Because they are served on the admin port, they do not collide with S3 bucket names and do not require AWS SigV4 signing, so a load balancer can poll them directly. + +### Liveness + +```bash +curl http://localhost:19878/health/live +OK +``` + +Returns `200 OK` while the gateway process is up and its web admin server can serve requests. It does not check OM reachability. + +### Readiness + +```bash +curl http://localhost:19878/health/ready +READY +``` + +Returns `200 READY` only when the gateway can reach OM, and `503 NOT READY` during startup or while OM is unreachable. A background probe refreshes OM reachability off the request path, so the endpoint always responds immediately and cannot be blocked by a slow OM. The probe cadence and its timeout are tunable with `ozone.s3g.health-check.probe.interval` and `ozone.s3g.health-check.probe.timeout`. + +When S3 Gateway is horizontally scaled, point the load balancer's HTTP health check at the readiness endpoint so it only routes S3 traffic to gateways that can serve it; see the bundled `compose/common/s3-haproxy.cfg` for a worked HAProxy example. Both endpoints can be turned off with `ozone.s3g.health-check.enabled=false`, which removes them entirely. Note that the bundled Kubernetes manifests and HAProxy configs probe `/health/live` and `/health/ready` unconditionally, so if you disable the endpoints you must also remove those probes from your deployment; otherwise Kubernetes restarts the pods on failed liveness checks and HAProxy marks every backend down. Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
