Skip to content

Commit

Permalink
fix: increases DERP send queue length to 512 for increased throughput
Browse files Browse the repository at this point in the history
Signed-off-by: Spike Curtis <[email protected]>
  • Loading branch information
spikecurtis committed May 30, 2024
1 parent 0fa29af commit 7c2c1ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion derp/derp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ func init() {
}

const (
perClientSendQueueDepth = 32 // packets buffered for sending
// perClientSendQueueDepth is the number of packets to buffer for sending.
// CODER: We've modified this to 512, up from 32 in upstream Tailscale to improve DERP
// throughput. 32 is an understandable number for big, public DERP servers that Tailscale run,
// serving many thousands of connections, and where Tailscale is footing the bill. In Coder's
// use case, we are serving hundreds to low thousands of users and the user's own company is
// paying the bills. In testing, it increases DERP throughput up to 6x.
perClientSendQueueDepth = 512
writeTimeout = 2 * time.Second
)

Expand Down

0 comments on commit 7c2c1ea

Please sign in to comment.