Skip to content

Support HEAD method for healthcheck #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrchypark opened this issue May 10, 2024 · 1 comment · Fixed by #802
Closed

Support HEAD method for healthcheck #796

mrchypark opened this issue May 10, 2024 · 1 comment · Fixed by #802
Assignees
Labels

Comments

@mrchypark
Copy link

It would be beneficial for the healthcheck endpoint to support the HEAD HTTP method. Here are some reasons why:

The HEAD method is similar to GET, but it only retrieves the headers of the response without the response body. This makes it lightweight and efficient for checking the status of a resource without transferring unnecessary data.

Compliance with HTTP standards: Supporting the HEAD method adheres to the HTTP specification, which states that any resource that supports GET should also support HEAD. This ensures better compatibility and interoperability with clients and tools that expect HEAD support.

Faster response times: Since the HEAD method doesn't require the server to generate and send the response body, it can lead to faster response times compared to using GET for healthcheck. This can be important in latency-sensitive environments or when dealing with a high volume of healthcheck requests.

Consistency with other endpoints: If other endpoints in the application already support the HEAD method, having the healthcheck endpoint also support it maintains consistency and follows the principle of least astonishment for developers and users interacting with the API.

Supporting the HEAD method for the healthcheck endpoint aligns with best practices, improves efficiency, and enhances the overall user experience of the application.
Please let me know if you have any further questions or if there's anything else I can assist with.

@nitisht
Copy link
Member

nitisht commented May 16, 2024

Thanks @mrchypark this makes sense. We'll add the support soon.

@nitisht nitisht added the server label May 16, 2024 — with Linear
nitisht pushed a commit that referenced this issue May 22, 2024
The HEAD method is in addition to the GET method
for liveness and readiness APIs

Fixes #796
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants