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

feat(gateway): add HTTP health check #4120

Merged
merged 3 commits into from
Mar 13, 2024
Merged

Conversation

thomaseizinger
Copy link
Member

@thomaseizinger thomaseizinger commented Mar 13, 2024

This adds the same kind of HTTP health-check that is already present in the relay to the gateway. The health-check returns 200 OK for as long as the gateway is active. The gateway automatically shuts down on fatal errors (like authentication failures with the portal).

To enable this, I've extracted a crate http-health-check that shares this code between the relay and the gateway.

Resolves: #2465.

Copy link

vercel bot commented Mar 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
firezone ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2024 8:52pm

Copy link

github-actions bot commented Mar 13, 2024

Terraform Cloud Plan Output

Plan: 8 to add, 7 to change, 8 to destroy.

Terraform Cloud Plan

Copy link

github-actions bot commented Mar 13, 2024

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 194.4 MiB (-3%) 195.0 MiB (-3%) 204 (-17%)
direct-tcp-server2client 193.8 MiB (-1%) 194.7 MiB (-2%) 536 (-32%)
relayed-tcp-client2server 133.4 MiB (-3%) 134.0 MiB (-3%) 145 (-10%)
relayed-tcp-server2client 142.5 MiB (-3%) 142.8 MiB (-3%) 150 (-12%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 50.0 MiB (-0%) 0.06ms (-53%) 0.00% (NaN%)
direct-udp-server2client 50.0 MiB (+0%) 0.03ms (-8%) 0.00% (NaN%)
relayed-udp-client2server 50.0 MiB (0%) 0.12ms (-2%) 0.00% (NaN%)
relayed-udp-server2client 50.0 MiB (+0%) 0.07ms (+5%) 0.00% (NaN%)

Copy link
Collaborator

@ReactorScram ReactorScram left a comment

Choose a reason for hiding this comment

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

LGTM. What calls this health check?

rust/http-health-check/src/lib.rs Outdated Show resolved Hide resolved
@thomaseizinger
Copy link
Member Author

LGTM. What calls this health check?

For us not yet anything but could be used to roll over gateways in staging for example.

Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
@thomaseizinger thomaseizinger added this pull request to the merge queue Mar 13, 2024
Merged via the queue into main with commit 9767bdd Mar 13, 2024
134 checks passed
@thomaseizinger thomaseizinger deleted the feat/gateway-health-check branch March 13, 2024 21:15
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.

Provide health-check endpoint for gateway
3 participants