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 a default health check endpoint at /healthz #4291

Merged
merged 1 commit into from
Apr 24, 2020
Merged

add a default health check endpoint at /healthz #4291

merged 1 commit into from
Apr 24, 2020

Conversation

no-reply
Copy link
Contributor

@no-reply no-reply commented Apr 24, 2020

creates a health check endpoint at /healthz if the application has
the okcomputer gem installed. this gets us:

- an application liveness check at `/healthz`
- a relatively robust readiness check at `/healthz/all`

we choose OkComputer for the framework for this endpoint due to the ease of
extension, and due to an existing install base in parts of the community. we
should be able to source a reasonable set of default health checks from existing
code with relatively minor effort.

we'll want to extend this to check Fedora and Solr connections, and maybe
certain valkyrie features. for now, we just check the ActiveRecord DB and
the configured rails cache. if MEMCACHED_HOST is set, we check that; otherwise
we just use the OkComputer default cache check. some applications may need to
do special configuration to make sure the cache check is functioning properly.

introducing this now as an incomplete service, and with an extra step required
to turn on will give us a chance to iron out details and avoid stepping on the
toes of any applications with their own healthz endpoints.

the check can be installed during app generation by passing false to the
skip-health-check option.

@samvera/hyrax-code-reviewers

creates a health check endpoint at `/healthz` if the application has
the `okcomputer` gem installed. this gets us:

    - an application liveness check at `/healthz`
    - a relatively robust readiness check at `/healthz/all`

we choose `OkComputer` for the framework for this endpoint due to the ease of
extension, and due to an existing install base in parts of the community. we
should be able to source a reasonable set of default health checks from existing
code with relatively minor effort.

we'll want to extend this to check Fedora and Solr connections, and maybe
certain `valkyrie` features. for now, we just check the `ActiveRecord` DB and
the configured rails cache. if `MEMCACHED_HOST` is set, we check that; otherwise
we just use the `OkComputer` default cache check. some applications may need to
do special configuration to make sure the cache check is functioning properly.

introducing this now as an incomplete service, and with an extra step required
to turn on will give us a chance to iron out details and avoid stepping on the
toes of any applications with their own `healthz` endpoints.

the check can be installed during app generation by passing `false` to the
`skip-health-check` option.
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

Successfully merging this pull request may close these issues.

2 participants