Skip to content

Commit 1baad76

Browse files
committed
fixup! Merge branch 'main' into colin/wg-trim
1 parent ad86474 commit 1baad76

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tailnet/conn.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ func init() {
6565
// Globally disable network namespacing. All networking happens in
6666
// userspace.
6767
netns.SetEnabled(false)
68-
// Tailscale, by default, "trims" the set of peers down to ones that we are "actively" communicating with in
69-
// an effort to save memory. But, we want to make sure the Wireguard connection is up and handshaked before sending
70-
// TCP traffic over it to avoid anomalously long round-trip time of the initial handshake
71-
// c.f. https://github.com/coder/coder/issues/7388#issuecomment-1625463069 for more details.
68+
// Tailscale, by default, "trims" the set of peers down to ones that we are
69+
// "actively" communicating with in an effort to save memory. Since
70+
// Tailscale removed keep-alives, it seems like open but idle connections
71+
// (SSH, port-forward, etc) can get trimmed fairly easily, causing hangs for
72+
// a few seconds while the connection is setup again.
7273
//
73-
// If Tailscale is waiting for traffic to bring up Wireguard, and we wait for Wireguard to send traffic, that's a
74-
// deadlock. So, disable this feature.
75-
//
76-
// Note that Tailscale.com's use case is very different from ours: in their use case, users create one persistent
77-
// tailnet per device, and it allows connections to every other thing in Tailscale that belongs to them. The
74+
// Note that Tailscale.com's use case is very different from ours: in their
75+
// use case, users create one persistent tailnet per device, and it allows
76+
// connections to every other thing in Tailscale that belongs to them. The
7877
// tailnet stays up as long as your laptop or phone is turned on.
7978
//
80-
// Our use case is different: for clients, it's a point-to-point connection to a single workspace, and lasts only as
81-
// long as the connection. For agents, it's connections to a small number of clients (CLI or Coderd) that are being
82-
// actively used by the end user.
79+
// Our use case is different: for clients, it's a point-to-point connection
80+
// to a single workspace, and lasts only as long as the connection. For
81+
// agents, it's connections to a small number of clients (CLI or Coderd)
82+
// that are being actively used by the end user.
8383
envknob.Setenv("TS_DEBUG_TRIM_WIREGUARD", "false")
8484
}
8585

0 commit comments

Comments
 (0)