Add /healthz endpoint for health monitoring in S3Proxy
This PR introduces a new /healthz endpoint in S3Proxy to provide a basic health check mechanism.
Changes:
-
Added a /healthz route to handle GET requests.
-
Implemented handleVersionRequest method to return a JSON response:
{ "status": "OK" } -
Updated S3ProxyHandler to route and process health check requests.
This endpoint serves as a lightweight solution for monitoring the service's availability.
I'm preparing a new release so please try to address my comments before the weekend.
I'll work on those during the coming days, had a busy weeks
This PR introduces a new /healthz endpoint in S3Proxy to provide a basic health check mechanism.
For the "has my app started yet" aspect of "basic health check mechanism" in k8s, you can also do:
livenessProbe:
tcpSocket:
port: 80
The docker image exposes port 80 and the Java app/server is listening on port 80. Until the Java server is initialized, the TCP connection on port 80 won't be able to be established.
The addition of an explicit /healthz HTTP endpoint (that is un-authed) in the PR is useful though because it lays the foundation for doing a more meaningful "health check". For example, if the backend provider is GCS, the health check should ping the GCS endpoint to make sure it's reachable.
@Aazme could you finish this PR?
@Aazme could you finish this PR?