Skip to content

Commit

Permalink
Merge pull request #54 from coder/spike/derp-q-512
Browse files Browse the repository at this point in the history
fix: increases DERP send queue length to 512 for increased throughput
  • Loading branch information
spikecurtis authored May 30, 2024
2 parents 0fa29af + 7c2c1ea commit 1ac63d3
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 1ac63d3

Please sign in to comment.