tailscale/wgengine/magicsock
James Tucker e1c7e9b736 wgengine/magicsock: improve endpoint selection for WireGuard peers with rx time
If we don't have the ICMP hint available, such as on Android, we can use
the signal of rx traffic to bias toward a particular endpoint.

We don't want to stick to a particular endpoint for a very long time
without any signals, so the sticky time is reduced to 1 second, which is
large enough to avoid excessive packet reordering in the common case,
but should be small enough that either rx provides a strong signal, or
we rotate in a user-interactive schedule to another endpoint, improving
the feel of failover to other endpoints.

Updates #8999

Co-authored-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>

Signed-off-by: James Tucker <james@tailscale.com>
Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2023-08-22 15:39:08 -07:00
..
batching_conn.go wgengine/magicsock: factor out more separable parts 2023-07-26 14:39:43 -07:00
blockforever_conn.go wgengine/magicsock: factor out more separable parts 2023-07-26 14:39:43 -07:00
debughttp.go types/netmap, all: use read-only tailcfg.NodeView in NetworkMap 2023-08-18 20:04:35 -07:00
debugknobs_stubs.go magicsock: set the don't fragment sockopt (#8715) 2023-08-11 09:34:51 +01:00
debugknobs.go magicsock: set the don't fragment sockopt (#8715) 2023-08-11 09:34:51 +01:00
derp.go wgengine/magicsock: improve endpoint selection for WireGuard peers with rx time 2023-08-22 15:39:08 -07:00
discopingpurpose_string.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
dontfrag_darwin.go magicsock: set the don't fragment sockopt (#8715) 2023-08-11 09:34:51 +01:00
dontfrag_default.go magicsock: set the don't fragment sockopt (#8715) 2023-08-11 09:34:51 +01:00
dontfrag_linux.go magicsock: set the don't fragment sockopt (#8715) 2023-08-11 09:34:51 +01:00
endpoint_default.go wgengine/magicsock: clear out endpoint statistics when it becomes bad 2023-08-22 15:22:50 -07:00
endpoint_js.go wgengine/magicsock: clear out endpoint statistics when it becomes bad 2023-08-22 15:22:50 -07:00
endpoint_tracker_test.go wgengine/magicsock: only cache N most recent endpoints per-Addr 2023-08-15 14:06:42 -07:00
endpoint_tracker.go wgengine/magicsock: only cache N most recent endpoints per-Addr 2023-08-15 14:06:42 -07:00
endpoint.go wgengine/magicsock: improve endpoint selection for WireGuard peers with rx time 2023-08-22 15:39:08 -07:00
magicsock_default.go wgengine/magicsock: delete unused stuff 2023-07-26 11:44:41 -07:00
magicsock_linux.go wgengine/magicsock: clarify a log message is a warning, not an error 2023-06-22 08:16:41 -07:00
magicsock_test.go wgengine/magicsock: improve endpoint selection for WireGuard peers with rx time 2023-08-22 15:39:08 -07:00
magicsock_unix_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
magicsock.go wgengine/magicsock: improve endpoint selection for WireGuard peers with rx time 2023-08-22 15:39:08 -07:00
peermap.go wgengine/magicsock: factor out peerMap into separate file 2023-07-26 13:39:57 -07:00
rebinding_conn.go wgengine/magicsock: factor out more separable parts 2023-07-26 14:39:43 -07:00