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

Reintroduce health liveliness check #1859

Merged
merged 20 commits into from
Sep 22, 2022
Merged

Reintroduce health liveliness check #1859

merged 20 commits into from
Sep 22, 2022

Conversation

o0Ignition0o
Copy link
Contributor

@o0Ignition0o o0Ignition0o commented Sep 21, 2022

closes #1861
fixes #1852

Reintroduce health liveliness check (Issue #1861)

Depending on their environments and cloud settings, users may or may not be able to craft health probes that are able to make CSRF compatible GraphQL queries.
This is one of the reasons why we reintroduced a health check in the router.

The health liveness check endpoint is exposed on 127.0.0.1:8088/health, and its listen address can be changed in the yaml configuration:

health-check:
  listen: 127.0.0.1:8088 # default
  enabled: true # default

@github-actions

This comment has been minimized.

@o0Ignition0o o0Ignition0o self-assigned this Sep 21, 2022
@o0Ignition0o o0Ignition0o marked this pull request as ready for review September 21, 2022 16:57
@o0Ignition0o o0Ignition0o changed the title Provide a healthcheck endpoint. Reintroduce health liveliness check Sep 21, 2022
@abernix
Copy link
Member

abernix commented Sep 21, 2022

let's think about how these gql queries get (or shouldn't get) reported to studio.

@lennyburdette
Copy link
Contributor

(moved conversation from slack) I'm using OTel for traces and I'm seeing a million health check traces that distract from the useful ones. Any ideas on how to avoid that?

Thanks for adding this back!

RELEASE_CHECKLIST.md Show resolved Hide resolved
apollo-router/src/configuration/mod.rs Outdated Show resolved Hide resolved
docs/source/configuration/health-checks.mdx Outdated Show resolved Hide resolved
docs/source/containerization/kubernetes.mdx Outdated Show resolved Hide resolved
helm/chart/router/README.md Outdated Show resolved Hide resolved
helm/chart/router/values.yaml Outdated Show resolved Hide resolved
);
.expect("query is always valid");
async move {
let (parts, body) = run_graphql_request(service, health_check_request)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of calling run_graphql_request and needing to deserialize json, maybe this could reproduce this part of the run_graphql_request function?

https://github.com/apollographql/router/blob/main/apollo-router/src/axum_http_server_factory.rs#L812-L834

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going with a static response for now

@abernix abernix assigned BrynCooke and unassigned o0Ignition0o Sep 22, 2022
@BrynCooke BrynCooke merged commit adea33b into main Sep 22, 2022
@BrynCooke BrynCooke deleted the igni/healthcheck branch September 22, 2022 10:29
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.

reintroduce health liveliness check New healthcheck path is not compatible with AWS ALB
6 participants