Closed rayz closed 3 weeks ago
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.
Use HttpConnector::set_connect_timeout
One caveat is that set_connect_timeout carries the following note:
If a domain resolves to multiple IP addresses, the timeout will be evenly divided across them.
The datadog-agent uses the Dialer.Timeout field to set the timeout with a value of 30 which may also be divided
Dialer.Timeout
30
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.
Solution
Use HttpConnector::set_connect_timeout
Notes
One caveat is that set_connect_timeout carries the following note:
The datadog-agent uses the
Dialer.Timeout
field to set the timeout with a value of30
which may also be divided