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

HTTP Health check and metrics #184

Merged
merged 13 commits into from
Oct 23, 2024
Merged

Conversation

viktorerlingsson
Copy link
Member

Adds a health check over http on http://listen_address:http_port/healthz that returns 200 OK when amqproxy is up and running.
Supersedes #179

Also adds some simple prometheus style metrics. Just client_connections and upstream_connections for now, but this can be extended in the future (maybe some throughput stats and server resource information?).

@j-m-harris
Copy link
Contributor

Thanks for implementing this!

@viktorerlingsson viktorerlingsson force-pushed the http-server-healthz-metrics branch from 0363560 to 747f567 Compare October 11, 2024 13:56
@viktorerlingsson viktorerlingsson requested a review from a team as a code owner October 11, 2024 13:56
@viktorerlingsson
Copy link
Member Author

Fix for integration test failure in #185

@carlhoerberg
Copy link
Member

Dockerfile EXPOSE for the http port should be added?

@viktorerlingsson viktorerlingsson force-pushed the http-server-healthz-metrics branch from 46f6949 to 4d28f02 Compare October 14, 2024 07:54
@viktorerlingsson viktorerlingsson force-pushed the http-server-healthz-metrics branch from 4d28f02 to 4963513 Compare October 23, 2024 08:22
@viktorerlingsson viktorerlingsson merged commit 6026688 into main Oct 23, 2024
4 checks passed
@viktorerlingsson viktorerlingsson deleted the http-server-healthz-metrics branch October 23, 2024 08:24
@carlhoerberg
Copy link
Member

carlhoerberg commented Oct 23, 2024 via email

@viktorerlingsson
Copy link
Member Author

How much did memory usage increase with this? Probably little, but did we do any test?

No, didn't do any proper testing of that before, but here's a comparison between 2.0.2 and 2.0.3.
VmSize is ~17MB bigger, but RSS is just ~350kb extra.

2.0.2

VmPeak:    38204 kB
VmSize:    38136 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:      6504 kB
VmRSS:      6484 kB
RssAnon:            1584 kB
RssFile:            4900 kB
RssShmem:              0 kB
VmData:    28340 kB
VmStk:       132 kB
VmExe:      1240 kB
VmLib:      4944 kB
VmPTE:        76 kB
VmSwap:        0 kB

2.0.3

VmPeak:    55144 kB
VmSize:    55144 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:      6856 kB
VmRSS:      6836 kB
RssAnon:            1600 kB
RssFile:            5236 kB
RssShmem:              0 kB
VmData:    44732 kB
VmStk:       132 kB
VmExe:      1648 kB
VmLib:      5012 kB
VmPTE:        84 kB
VmSwap:        0 kB

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.

6 participants