Allow configuring the connection timeout for HTTP clients. #177
Labels
area/io
General I/O and networking.
effort/intermediate
Involves changes that can be worked on by non-experts but might require guidance.
good first issue
Good for newcomers
type/enhancement
An enhancement in functionality or support.
Milestone
Context
When building an HTTP client, we should be able to configure a timeout specifically for connecting to the downstream target system. This is a simple assurance against extended delays trying to connect to unresponsive systems.
We should be able to trivially support this by dropping down directly to
HttpConnector
(fromhyper-util
) when building ourHttpsConnector
, as it supports setting the connection timeout viaHttpConnector::set_connect_timeout
.Notes
One caveat is that
set_connect_timeout
carries the following note:We should check what Go does, in particular how the Datadog Agent is using
net/http/Client
, since we know that hosts will commonly resolve to multiple IP addresses when load balanced.. but it's not clear to me if Go/Datadog Agent are also going to try all of those IPs, and enforcing the connect timeout per IP, or just picking one IP, or doing whathyper-util
also does, etc....The text was updated successfully, but these errors were encountered: