tpd: apply a telemetry shard once, pace uptime heartbeats - #5268
Merged
Merged
Conversation
A visor re-Puts a telemetry shard only when its content changes, but every Root — the 45 s heartbeat included — carries every shard, and TPD applied every shard of every Root: with both edges of ~90k transports reporting, ~4k applies a second (a bandwidth script, a latency script, a throughput write and an uptime heartbeat each), rewriting what redis already held. That was the bulk of prod redis's load. An unchanged shard (by content hash, recorded only once applied in full) is applied once. The Root still proves its transports are up, so they get their uptime heartbeat — at most one per 90 s per transport, the cadence the uptime denominator assumes, whichever edge reports and dated now. Counting every ingest inflated a live transport's count two to four times over and dated its timeline slot to its last change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A visor re-Puts a telemetry shard only when its content changes, but every Root (the 45 s heartbeat included) carries every shard, and TPD applied every shard of every Root: with both edges of ~90k transports reporting, ~4k applies/s (bandwidth script + latency script + throughput write + uptime heartbeat each), rewriting what redis already held — the bulk of prod redis load (EVALSHA 82k, HINCRBY 362k, EXPIRE 520k per 30 s).
An unchanged shard (content hash, recorded only after a full apply) is applied once. The Root still proves its transports are up, so they get their uptime heartbeat — at most one per 90 s per transport (the cadence the uptime denominator assumes), whichever edge reports, dated now. Counting every ingest inflated a live transport's count 2–4× (clamped at 100%) and dated its timeline slot to its last change.