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 health check which doesn't go upstream #179

Closed
wants to merge 1 commit into from

Conversation

j-m-harris
Copy link
Contributor

@j-m-harris j-m-harris commented Oct 7, 2024

This addresses a problem we saw with having a TCP 'socket open' health check for amqproxy (e.g. in a k8s environment). If debug was enabled then we would see socket EOF errors, as amqproxy tries to read from the client.

This health check is specifically for amqproxy, and not testing the upstream connection (we could use an AMQP heartbeat frame for that).

  • Client sends AMQP9999 only.
  • amqproxy returns HEALTHOK and closes the connection.

@kickster97
Copy link
Member

Thanks for the contribution, looks interesting!
We have considered implementing something more generic, like an http health check with a prometheus endpoint to get better monitoring.

@j-m-harris
Copy link
Contributor Author

Thanks for the contribution, looks interesting! We have considered implementing something more generic, like an http health check with a prometheus endpoint to get better monitoring.

Fair enough, that sounds good!

@carlhoerberg
Copy link
Member

Could also just debug log EOFErrors during the client negotiation phase so that they are easily ignored.

carlhoerberg added a commit that referenced this pull request Oct 13, 2024
Rudimentary health checks, or port scanner, or whatever can open a TCP
connection and then immediately close it without sending anything. This
change suppresses debug logging for such connections.

Fixes #179
carlhoerberg added a commit that referenced this pull request Oct 21, 2024
Rudimentary health checks, or port scanner, or whatever can open a TCP
connection and then immediately close it without sending anything. This
change suppresses debug logging for such connections.

Fixes #179
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.

3 participants