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

Add more checks to /healthcheck #255

Open
matheus23 opened this issue Mar 19, 2024 · 2 comments
Open

Add more checks to /healthcheck #255

matheus23 opened this issue Mar 19, 2024 · 2 comments

Comments

@matheus23
Copy link
Member

At the time of writing, https://server.fission.dev/healthcheck reports {"database_connected":true,"database_up_to_date":true}, but it's not actually all fine.

Here's some tests to make sure DNS is configured correctly:

  • origin_correct: Check if the request's domain matches our origin configured in the settings
  • origin_ns_resolvable: Check if NS <origin> at 1.1.1.1 or 8.8.8.8 or the system-based DNS resolver resolves to our IP address. This makes sure our DNS service is running and set up correctly.
  • users_origin_ns_resolvable: Check if we can DNS-resolve NS <users_origin> (with 1.1.1.1 etc.) to make sure it resolves to our IP address.

I'm not 100% sure yet if these checks are the correct ones. E.g. what if we don't know our own IP address? Or if there's some forwarding going on.
Perhaps it makes more sense to try to resolve _did.<origin> to see if it resolves as our own DID?
But what if there's two accidentally deploys with the same DID? Or an old deploy with the same DID is still cached?
Also, we don't have any TXT records on <users_origin> by default. Perhaps we should add one? And call it _healthcheck, make sure that it's set to an in-memory random variable and see if it resolves correctly?

@matheus23 matheus23 changed the title Add DNS checks to /healthcheck Add more checks to /healthcheck Mar 19, 2024
@matheus23
Copy link
Member Author

Another thing we could add to /healthcheck is just printing out the environment: "environment": "prod" / "environment": "staging", etc.

@matheus23
Copy link
Member Author

Also information about the connection status of ipfs.peers that were configured?

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

No branches or pull requests

1 participant