cloudflared-mirror/cmd/cloudflared/config
David Jimenez d7c4a89106
Add max upstream connections dns-proxy option (#290)
* Add max upstream connections dns-proxy option

Allows defining a limit to the number of connections that can be
established with the upstream DNS host.

If left unset, there may be situations where connections fail to
establish, which causes the Transport to create an influx of connections
causing upstream to throttle our requests and triggering a runaway
effect resulting in high CPU usage. See https://github.com/cloudflare/cloudflared/issues/91

* Code review with proposed changes

* Add max upstream connections flag to tunnel flags

* Reduce DNS proxy max upstream connections default value

Reduce the default value of maximum upstream connections on the DNS
proxy to guarantee it works on single-core and other low-end hardware.
Further testing could allow for a safe increase of this value.

* Update dns-proxy flag name

Also remove `MaxUpstreamConnsFlag` const as it's no longer referenced in more than one place and to make things more consistent with how the other flags are referenced.

Co-authored-by: Adam Chalmers <achalmers@cloudflare.com>
2021-02-12 21:32:29 +04:00
..
configuration.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
configuration_test.go TUN-3476: Fix conversion to string and int slice 2020-10-21 16:03:25 +01:00
manager.go TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00
manager_test.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
model.go Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00