cloudflared-mirror/cmd/cloudflared/tunnel
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
..
cmd.go Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00
cmd_test.go TUN-1669: Update license message in help text. Also fix test 2019-04-18 10:42:48 -05:00
configuration.go TUN-3848: Use transport logger for h2mux 2021-02-03 17:31:16 -06:00
configuration_test.go TUN-1196: Allow TLS config client CA and root CA to be constructed from multiple certificates 2018-11-19 15:38:10 -06:00
credential_finder.go TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00
filesystem.go TUN-3581: Tunnels can be run by name using only --credentials-file, no 2020-11-25 09:54:28 -06:00
ingress_subcommands.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
login.go TUN-3470: Replace in-house logger calls with zerolog 2020-12-23 14:15:17 -06:00
server.go Add max upstream connections dns-proxy option (#290) 2021-02-12 21:32:29 +04:00
signal.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
signal_test.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
subcommand_context.go TUN-3864: Users can choose where credentials file is written after creating a tunnel 2021-02-05 11:20:51 -06:00
subcommand_context_teamnet.go TUN-3688: Subcommand for users to check which route an IP proxies through 2021-01-07 15:31:26 +00:00
subcommand_context_test.go TUN-3607: Set up single-file logger with zerolog 2020-12-23 14:15:39 -06:00
subcommands.go TUN-3864: Users can choose where credentials file is written after creating a tunnel 2021-02-05 11:20:51 -06:00
subcommands_test.go TUN-3578: cloudflared tunnel route dns should allow wildcard subdomains 2020-11-23 09:37:46 -06:00
tag.go TUN-1099: Bring back changes in 2018.10.1 2018-10-08 14:20:28 -05:00
tag_test.go TUN-1099: Bring back changes in 2018.10.1 2018-10-08 14:20:28 -05:00
teamnet_subcommands.go Review from Igor 2021-01-11 19:36:31 +00:00