Skip to content

Add more checks to /healthcheck #255

Open
@matheus23

Description

@matheus23

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions