Repository navigation
gocache/awscache: count get response and put body bytes by storage - #28
Merged
Merged
Conversation
The only byte metrics were the gocache_aws_object_bytes histograms of uncompressed object sizes, labeled by op, so a dashboard could show how many gets each storage served (from gocache_aws_get_duration_seconds) but not how many bytes: how much is served inline from DynamoDB, through the blob servers, and from S3 directly when the blob servers miss. Add counters of the body bytes actually sent in get hit responses and received in non-duplicate puts, labeled by storage. Get responses are counted as sent: blobs go to clients that accept lz4 (as cigocacher does) still compressed, as they came from the blob server or S3, so counting their uncompressed size would overstate the bytes moved. Put bodies arrive uncompressed. Updates tailscale/corp#52240 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I0931d5a9d05b37e76df4ad6dc1595c0e80e5d3ea
tomhjp
approved these changes
Nov 26, 2026
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.
The only byte metrics were the gocache_aws_object_bytes histograms of
uncompressed object sizes, labeled by op, so a dashboard could show how
many gets each storage served (from gocache_aws_get_duration_seconds)
but not how many bytes: how much is served inline from DynamoDB,
through the blob servers, and from S3 directly when the blob servers
miss.
Add counters of the body bytes actually sent in get hit responses and
received in non-duplicate puts, labeled by storage. Get responses are
counted as sent: blobs go to clients that accept lz4 (as cigocacher
does) still compressed, as they came from the blob server or S3, so
counting their uncompressed size would overstate the bytes moved. Put
bodies arrive uncompressed.
Updates tailscale/corp#52240