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

Ping() is not overlay/network or kubernetes friendly #913

Open
Bonn93 opened this issue Oct 22, 2019 · 1 comment
Open

Ping() is not overlay/network or kubernetes friendly #913

Bonn93 opened this issue Oct 22, 2019 · 1 comment

Comments

@Bonn93
Copy link

Bonn93 commented Oct 22, 2019

Whilst developing a go based web app in docker, using the Ping() function to check the connection works in a majority of cases, however.

When Postgres is provided on a network that does not support ICMP, or exposed via a v1/service in kubernetes, ping is not the best test and will fail. Some networks may also drop ICMP traffic causing the use of this function to throw errors.

Is there a better way to perform this that's more friendly to overlay networks or kubernetes services?

@gilwi
Copy link

gilwi commented Feb 17, 2020

Hi,
Wouldn't it be more misleading to have a Ping() function which does not connect through ICMP?
Looking for this I saw ExecSimpleQuery(q string), which combined with a dummy query like SELECT 1; could fit your need

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

No branches or pull requests

2 participants