Use pooled http client for fetching providers
While the TLS handshakes are a fairly small overhead compared to downloading the providers, clients in some situation are failing to complete the TLS handshake in a timely manner. It's unclear if this is because of heavily constrained clients are stalling while doing the major crpto operations, or the edge servers are throttling repeated requests from the same IPs. This should allow reusing the open TLS connection to the release edge servers during init.
This commit is contained in:
parent
a41d5d634d
commit
6cb4e14cf8
|
@ -33,7 +33,7 @@ const protocolVersionHeader = "x-terraform-protocol-version"
|
||||||
|
|
||||||
var releaseHost = "https://releases.hashicorp.com"
|
var releaseHost = "https://releases.hashicorp.com"
|
||||||
|
|
||||||
var httpClient = cleanhttp.DefaultClient()
|
var httpClient = cleanhttp.DefaultPooledClient()
|
||||||
|
|
||||||
// An Installer maintains a local cache of plugins by downloading plugins
|
// An Installer maintains a local cache of plugins by downloading plugins
|
||||||
// from an online repository.
|
// from an online repository.
|
||||||
|
|
Loading…
Reference in New Issue