Skip to content
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

Make healthcheck check a little bit more #11473

Open
matrixbot opened this issue Dec 19, 2023 · 0 comments
Open

Make healthcheck check a little bit more #11473

matrixbot opened this issue Dec 19, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 19, 2023

This issue has been migrated from #11473.


Currently /health looks like this;

    def render_GET(self, request: Request) -> bytes:
        request.setHeader(b"Content-Type", b"text/plain")
        return b"OK"

Which is functionally equivalent to calling /versions on the endpoint.

I think that this should do a little more than just blindly respond with 'everything is fine', giving me a similar feeling to the following meme;

image


Jokes aside, i think that this endpoint should perform or otherwise "check up" on some basic functionality, or otherwise return "not OK" (with 5XX) when some precondition isn't present (which could be defined from other resources).

Maybe this could be linked to an "error counter", which would count the last amount of exceptions in the last minute, and this health resource should then return "not OK" if it passes a threshold.

Other than that, this is open for further ideas.

@matrixbot matrixbot changed the title Dummy issue Make healthcheck check a little bit more Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
philipcristiano added a commit to philipcristiano/nixos-cluster-config that referenced this issue Feb 13, 2024
element-hq/synapse#11473

TODO: If there is not a token return 0 so this doesn't need to be set.  Useful when first setting up the service before any tokens exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant