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/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>
3 years ago
..
bench types/netmap: use key.NodePublic instead of tailcfg.NodeKey. 3 years ago
filter wgengine/filter: let unknown IPProto match if IP okay & match allows all ports 3 years ago
magicsock wgengine/magicsock: reduce disco ping heartbeat aggressiveness a bit 3 years ago
monitor support running in a FreeBSD jail 3 years ago
netstack wgengine/netstack: don't remove 255.255.255.255/32 from netstack 3 years ago
router wgengine/router{windows}: return the output from the firewallTweaker 3 years ago
wgcfg wgengine/wgcfg: recover from mismatched PublicKey/Endpoints 3 years ago
wglog wgengine/wgcfg: convert to use new node key type. 3 years ago
winnet all: gofmt -w -s (simplify) tests 3 years ago
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 3 years ago
pendopen.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 3 years ago
userspace.go ipnlocal, net/{dns,tsaddr,tstun}, wgengine: support MagicDNS on IPv6 3 years ago
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 3 years ago
userspace_test.go all: gofmt -w -s (simplify) tests 3 years ago
watchdog.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 3 years ago
watchdog_test.go all: close fake userspace engines when tests complete 3 years ago
wgengine.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 3 years ago