mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
logpolicy: allow longer idle log upload connections
From a packet trace we have seen log connections being closed prematurely by the client, resulting in unnecessary extra TLS setup traffic. Updates #3363 Updates tailscale/corp#9230 Updates tailscale/corp#8564 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
70b7201744
commit
6c3899e6ee
@ -769,6 +769,11 @@ func NewLogtailTransport(host string, netMon *netmon.Monitor, logf logger.Logf)
|
||||
}
|
||||
tr.DialContext = MakeDialFunc(netMon, logf)
|
||||
|
||||
// We're uploading logs ideally infrequently, with specific timing that will
|
||||
// change over time. Try to keep the connection open, to avoid repeatedly
|
||||
// paying the cost of TLS setup.
|
||||
tr.IdleConnTimeout = time.Hour
|
||||
|
||||
// We're contacting exactly 1 hostname, so the default's 100
|
||||
// max idle conns is very high for our needs. Even 2 is
|
||||
// probably double what we need:
|
||||
|
Loading…
Reference in New Issue
Block a user