cloudflared-mirror/cmd/cloudflared
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
..
access Update error message to use login command 2021-02-09 17:15:13 +00:00
buildinfo TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
cliutil TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
config Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00
encrypter TUN-1099: Bring back changes in 2018.10.1 2018-10-08 14:20:28 -05:00
path AUTH-3221: Saves org token to disk and uses it to refresh the app token 2020-11-24 21:38:59 +00:00
shell AUTH-2077: Quotes open browser command in windows 2019-09-24 18:27:37 +00:00
token AUTH-3375 exchangeOrgToken deleted cookie fix 2021-02-10 16:09:50 +00:00
transfer TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00
tunnel Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00
ui TUN-3635: Send event when unregistering tunnel for gracful shutdown so /ready endpoint reports down status befoe connections finish handling pending requests. 2021-02-08 15:38:42 +00:00
updater TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00
app_forward_service.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
app_resolver_service.go Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00
app_service.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
fips.go TUN-3826: Use go-fips when building cloudflared for linux/amd64 2021-02-02 18:12:14 +00:00
generic_service.go TUN-3233: List tunnels support filtering by deleted, name, existed at and id 2020-08-07 10:09:26 +01:00
linux_service.go TUN-3792: Handle graceful shutdown correctly when running as a windows service. Only expose one shutdown channel globally, which now triggers the graceful shutdown sequence across all modes. Removed separate handling of zero-duration grace period, instead it's checked only when we need to wait for exit. 2021-01-27 07:21:34 -06:00
macos_service.go TUN-3792: Handle graceful shutdown correctly when running as a windows service. Only expose one shutdown channel globally, which now triggers the graceful shutdown sequence across all modes. Removed separate handling of zero-duration grace period, instead it's checked only when we need to wait for exit. 2021-01-27 07:21:34 -06:00
main.go TUN-3913: Help gives wrong exit code for autoupdate 2021-02-11 08:39:56 -06:00
service_template.go TUN-3459: Make service install on linux use named tunnels 2020-10-21 10:46:29 -05:00
windows_service.go TUN-3792: Handle graceful shutdown correctly when running as a windows service. Only expose one shutdown channel globally, which now triggers the graceful shutdown sequence across all modes. Removed separate handling of zero-duration grace period, instead it's checked only when we need to wait for exit. 2021-01-27 07:21:34 -06:00