tailscale/cmd
Joe Tsai 84c99fe0d9
logtail: be less aggressive about re-uploads (#8117)
The retry logic was pathological in the following ways:

* If we restarted the logging service, any pending uploads
would be placed in a retry-loop where it depended on backoff.Backoff,
which was too aggresive. It would retry failures within milliseconds,
taking at least 10 retries to hit a delay of 1 second.

* In the event where a logstream was rate limited,
the aggressive retry logic would severely exacerbate the problem
since each retry would also log an error message.
It is by chance that the rate of log error spam
does not happen to exceed the rate limit itself.

We modify the retry logic in the following ways:

* We now respect the "Retry-After" header sent by the logging service.

* Lacking a "Retry-After" header, we retry after a hard-coded period of
30 to 60 seconds. This avoids the thundering-herd effect when all nodes
try reconnecting to the logging service at the same time after a restart.

* We do not treat a status 400 as having been uploaded.
This is simply not the behavior of the logging service.

Updates #tailscale/corp#11213

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-05-11 12:52:35 -07:00
..
addlicense all: update tools that manage copyright headers 2023-01-27 15:36:29 -08:00
cloner all: update tools that manage copyright headers 2023-01-27 15:36:29 -08:00
containerboot cmd/containerboot,kube: consolidate the two kube clients 2023-03-02 11:36:06 -08:00
derper go.mod: bump all deps possible that don't break the build 2023-05-03 19:52:54 -07:00
derpprobe prober: migrate to Prometheus metric library 2023-04-11 08:37:32 +01:00
dist release/dist: add forgotten license headers 2023-02-24 22:21:28 +00:00
get-authkey cmd/tailscale/cli: [up] add experimental oauth2 authkey support 2023-04-26 12:25:42 -07:00
gitops-pusher Add support for OAuth tokens #7394 (#7393) 2023-02-27 18:05:24 -08:00
hello all: update copyright and license headers 2023-01-27 15:36:29 -08:00
k8s-operator cmd/k8s-operator: print version in startup logs 2023-05-08 18:56:21 -07:00
mkmanifest cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 2023-03-01 15:45:12 -07:00
mkpkg all: update copyright and license headers 2023-01-27 15:36:29 -08:00
mkversion version/mkversion: open-source version generation logic 2023-02-18 05:21:05 +00:00
nardump all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netlogfmt all: replace logtail.{Public,Private}ID with logid.{Public,Private}ID (#7404) 2023-02-28 19:00:00 -08:00
nginx-auth tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
pgproxy various: add golangci-lint, fix issues (#7905) 2023-04-17 18:38:24 -04:00
printdep cmd/printdep: print correct toolchain URL 2023-02-11 17:57:36 +00:00
proxy-to-grafana tailcfg,all: add and use Node.IsTagged() 2023-03-13 08:44:25 -07:00
sniproxy cmd/sniproxy: Set App name in tsnet hostinfo 2023-04-28 21:50:30 -07:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ssh-auth-none-demo all: update copyright and license headers 2023-01-27 15:36:29 -08:00
stunc all: update copyright and license headers 2023-01-27 15:36:29 -08:00
sync-containers cmd/sync-containers: update latest and stable tags 2023-02-10 20:47:18 -08:00
tailscale various: add detection and Taildrop for Unraid 2023-05-04 13:40:13 -07:00
tailscaled logtail: be less aggressive about re-uploads (#8117) 2023-05-11 12:52:35 -07:00
testcontrol all: update copyright and license headers 2023-01-27 15:36:29 -08:00
testwrapper all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tsconnect cmd/tsconnect: fix forgotten API change for wasm 2023-05-09 21:23:29 -07:00
tsshd all: update copyright and license headers 2023-01-27 15:36:29 -08:00
viewer util/codegen: support embedded fields 2023-05-09 15:40:17 -07:00