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

Excon's connect_timeout and dns_timeout #200

Closed
bruno-b-martins opened this issue Sep 13, 2023 · 2 comments
Closed

Excon's connect_timeout and dns_timeout #200

bruno-b-martins opened this issue Sep 13, 2023 · 2 comments

Comments

@bruno-b-martins
Copy link
Contributor

bruno-b-martins commented Sep 13, 2023

Hey there 👋

In a recent PR (#197) we've introduced the connect_timeout option to set a timeout for a connection to the schema registry.

However, that only works for the connection between the application server (where AvroTurf is running) and the destination server (where the schema registry is running).
There is another server which is queried -> the domain name server (DNS) that resolves the host into an IP address.

Excon recently (today) released a version that supports setting this timeout towards the dns server (https://github.com/excon/excon/blob/master/README.md?plain=1#L198).
I'll open up a PR tomorrow to make use of this option, however, I want to ask you (@dasch) if you'd rather have an additional parameter being passed down from AvroTurf::Messaging to Excon, or use the same connect_timeout we've recently introduced?

Please note that dns_timeouts accepts an integer and an array of integers (to retry the request with different timeouts), while connect_timeout only accepts an integer.

@dasch
Copy link
Owner

dasch commented Sep 14, 2023

I think it's best to hardcode this until such a time as users need to customize, then we can consider.

@bruno-b-martins
Copy link
Contributor Author

Ok. Then, I'll simply pass AvroTurf::Messaging's connect_timeout option to Excon's dns_timeouts as well.

Thanks for the feedback.

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