s3proxy icon indicating copy to clipboard operation
s3proxy copied to clipboard

Add /healthz endpoint for health monitoring in S3Proxy

Open Aazme opened this issue 11 months ago • 5 comments

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.

Aazme avatar Jan 21 '25 12:01 Aazme

I'm preparing a new release so please try to address my comments before the weekend.

gaul avatar Jan 30 '25 16:01 gaul

I'll work on those during the coming days, had a busy weeks

Aazme avatar Feb 04 '25 11:02 Aazme

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.

musabshak avatar Mar 06 '25 18:03 musabshak

@Aazme could you finish this PR?

gaul avatar May 28 '25 01:05 gaul

@Aazme could you finish this PR?

gaul avatar Nov 18 '25 18:11 gaul