You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/control/controlhttp
Brad Fitzpatrick db048e905d control/controlhttp: simplify, fix race dialing, remove priority concept
controlhttp has the responsibility of dialing a set of candidate control
endpoints in a way that minimizes user facing latency. If one control
endpoint is unavailable we promptly dial another, racing across the
dimensions of: IPv6, IPv4, port 80, and port 443, over multiple server
endpoints.

In the case that the top priority endpoint was not available, the prior
implementation would hang waiting for other results, so as to try to
return the highest priority successful connection to the rest of the
client code. This hang would take too long with a large dialplan and
sufficient client to endpoint latency as to cause the server to timeout
the connection due to inactivity in the intermediate state.

Instead of trying to prioritize non-ideal candidate connections, the
first successful connection is now used unconditionally, improving user
facing latency and avoiding any delays that would encroach on the
server-side timeout.

The tests are converted to memnet and synctest, running on all
platforms.

Fixes #8442
Fixes tailscale/corp#32534

Co-authored-by: James Tucker <james@tailscale.com>
Change-Id: I4eb57f046d8b40403220e40eb67a31c41adb3a38
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Signed-off-by: James Tucker <james@tailscale.com>
2 months ago
..
controlhttpcommon control/controlhttp/controlhttpserver: split out Accept to its own package 1 year ago
controlhttpserver derp/derphttp: don't link websockets other than on GOOS=js 1 year ago
client.go control/controlhttp: simplify, fix race dialing, remove priority concept 2 months ago
client_common.go all: update copyright and license headers 3 years ago
client_js.go derp/derphttp: don't link websockets other than on GOOS=js 1 year ago
constants.go control/controlhttp: simplify, fix race dialing, remove priority concept 2 months ago
http_test.go control/controlhttp: simplify, fix race dialing, remove priority concept 2 months ago