Repository navigation
cache metrics: label origin duration by dispatch path - #4387
Closed
larry-dalmeida wants to merge 6 commits into
Closed
larry-dalmeida wants to merge 6 commits into
larry-dalmeida wants to merge 6 commits into
Conversation
Add skipper_cache_lru_entries{route} and skipper_cache_lru_capacity_bytes gauges. ShardedByteLRU.Usage returns bytes and entry count together; Bytes delegates to it.
Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
larry-dalmeida
force-pushed
the
cache-origin-dispatch-label
branch
from
October 26, 2026 16:43
f0fe37a to
adeef32
Compare
Count hit, stale, and miss outcomes per route ID and record the time from process start to the first cache hit. Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
- Route revalidation outcomes (started/success/failed/dropped) - Origin fetch duration by route and status class - Cache-Control directive tracking from origin responses These metrics instrument cache operations across routes and origin interactions. Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
larry-dalmeida
force-pushed
the
cache-origin-dispatch-label
branch
from
October 27, 2026 07:50
adeef32 to
d767f63
Compare
This was referenced Oct 27, 2026
larry-dalmeida
marked this pull request as draft
October 27, 2026 09:31
This was referenced Oct 29, 2026
Collaborator
Author
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.
Summary of changes
Adds a
dispatchlabel (direct|pipeline) toskipper_cache_origin_duration_seconds, introduced in #4386.In force mode with a static backend, cold-miss (coalesced) and revalidation origin fetches are dispatched directly and bypass Skipper's proxy pipeline. They are invisible to
MeasureBackend*metrics and the access log, andcache.reval_backend_dispatchonly counts revalidation. #4370 documents this gap; this PR makes the split observable per route and status class.Label cardinality is bounded:
dispatchhas 2 values, so each existing series is at most doubled.Docs (
docs/operation/operation.md) andCONTEXT.mdare updated.How to Verify
Shared setup
make verifystarts or reuses Minikube, the mock origin and the stack; runs the smoke and coalescing checks; and validates supported dashboard queries. It prints a report path and exits non-zero on failure. For outage evidence, runmake chaos SKIPPER_CHECKOUT=../skipper-pr-4387 NAME=origin-stale; it includes its own timed load. Requirements: Python 3.9+, Make, Bash, Git, curl, kubectl, Minikube, Docker and Go compatible with Skipper'sgo.mod. Free ports: 8080, 8081, 6379, 4318, 9091, 9999, 9911 (8089 for endless load). Dynamic URLs:.runtime/urls.txt; stop withmake stop.Validated on #4387 (
d767f636): smoke: 6,398 requests, 0 failures; origin-stale: 155 failed revalidations across 77 routes. Smoke metric checks: 42 PASS, 2 fault-only NOT EXERCISED, 0 FAIL.Focused tests
Expected: 14 focused tests pass. All 30 observed origin-duration series were
dispatch="direct"(force mode/static backend); allowed values:direct,pipeline. The histogram covers cold misses and refreshes;cache.reval_backend_dispatchcounts refreshes only.Checklist
Rollback Plan
Revert this PR; the metric returns to the
route/status_classlabel set from #4386.References & Additional Context