tailscale/wgengine
Brad Fitzpatrick 28bf53f502 wgengine/magicsock: reduce disco ping heartbeat aggressiveness a bit
Bigger changes coming later, but this should improve things a bit in
the meantime.

Rationale:

* 2 minutes -> 45 seconds: 2 minutes was overkill and never considered
  phones/battery at the time. It was totally arbitrary. 45 seconds is
  also arbitrary but is less than 2 minutes.

* heartbeat from 2 seconds to 3 seconds: in practice this meant two
  packets per second (2 pings and 2 pongs every 2 seconds) because the
  other side was also pinging us every 2 seconds on their own.
  That's just overkill. (see #540 too)

So in the worst case before: when we sent a single packet (say: a DNS
packet), we ended up sending 61 packets over 2 minutes: the 1 DNS
query and then then 60 disco pings (2 minutes / 2 seconds) & received
the same (1 DNS response + 60 pongs).  Now it's 15. In 1.22 we plan to
remove this whole timer-based heartbeat mechanism entirely.

The 5 seconds to 6.5 seconds change is just stretching out that
interval so you can still miss two heartbeats (other 3 + 3 seconds
would be greater than 5 seconds). This means that if your peer moves
without telling you, you can have a path out for 6.5 seconds
now instead of 5 seconds before disco finds a new one. That will also
improve in 1.22 when we start doing UDP+DERP at the same time
when confidence starts to go down on a UDP path.

Updates #3363

Change-Id: Ic2314bbdaf42edcdd7103014b775db9cf4facb47
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-01-05 14:05:16 -08:00
..
bench types/netmap: use key.NodePublic instead of tailcfg.NodeKey. 2021-11-01 17:07:40 -07:00
filter wgengine/filter: let unknown IPProto match if IP okay & match allows all ports 2021-12-05 10:44:18 -08:00
magicsock wgengine/magicsock: reduce disco ping heartbeat aggressiveness a bit 2022-01-05 14:05:16 -08:00
monitor support running in a FreeBSD jail 2021-12-05 21:42:52 -08:00
netstack wgengine/netstack: don't remove 255.255.255.255/32 from netstack 2021-12-16 14:15:07 -08:00
router wgengine/router{windows}: return the output from the firewallTweaker 2021-12-13 10:07:32 -08:00
wgcfg wgengine/wgcfg: recover from mismatched PublicKey/Endpoints 2021-11-18 14:28:41 -08:00
wglog wgengine/wgcfg: convert to use new node key type. 2021-10-28 09:39:23 -07:00
winnet all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
pendopen.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 2021-11-30 11:54:14 -08:00
userspace.go ipnlocal, net/{dns,tsaddr,tstun}, wgengine: support MagicDNS on IPv6 2022-01-04 14:37:22 -08:00
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
userspace_test.go all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
watchdog.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 2021-11-30 11:54:14 -08:00
watchdog_test.go all: close fake userspace engines when tests complete 2021-09-15 15:31:51 -07:00
wgengine.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 2021-11-30 11:54:14 -08:00