Repository navigation
cache: fix dispatch, stale retention and L1 freshness - #4394
larry-dalmeida wants to merge 10 commits into
Conversation
Share validated direct-versus-pipeline dispatch for cold misses and refreshes. Preserve transformed paths, outgoing Host and independent follower response bodies; reject Vary wildcard caching and sharing. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
Use variant-aware storage for cold misses, response processing and refreshes. Carry base keys through revalidation, enforce all Vary field lines for followers and retain cached bodies while merging conditional responses. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
Preserve eligible variants and original SIE timestamps on transport errors, incomplete bodies and HTTP 500/502/503/504, including inner loopback response processing. Recheck eligibility after fetch and skip queued refreshes superseded by newer fresh variants. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
Apply configured dial, TLS, response-header and expect-continue timeouts to the cache-origin transport without imposing a blanket request or body deadline. Cover timeout mapping, stale response preservation and recovery. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
Require positive-TTL L1 entries to remain within their freshness deadline before bypassing shared L2. Preserve zero-TTL semantics and stale retention, with freshness boundaries, fresh-L2 precedence, no-origin request regressions and benchmarks. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
|
Docker image "registry-write.opensource.zalan.do/teapot/skipper:f17089f2ef5bab0e8ce46d2dfd23ed6049c817ec" is not based on an approved base image. Any production deployment relying on this image will be blocked. To create a compliant Docker image of your application, you must reference an allowed Docker image as its base image in your Dockerfile. This base image must come from the Zalando Container Registry namespace |
f17089f to
cb8ac7e
Compare
|
Docker image "registry-write.opensource.zalan.do/teapot/skipper:cb8ac7e00d29bf8c578e5578dc57c462af6689ac" is not based on an approved base image. Any production deployment relying on this image will be blocked. To create a compliant Docker image of your application, you must reference an allowed Docker image as its base image in your Dockerfile. This base image must come from the Zalando Container Registry namespace |
Keep the singleflight callback independent of the live filter context after its initiating request returns. Cover cancellation during a blocked fetch and preserve the original Vary base key. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
|
Docker image "registry-write.opensource.zalan.do/teapot/skipper:7f776e41eeb1e21b8ad0b275548473e127aca041" is not based on an approved base image. Any production deployment relying on this image will be blocked. To create a compliant Docker image of your application, you must reference an allowed Docker image as its base image in your Dockerfile. This base image must come from the Zalando Container Registry namespace |
Snapshot filtered request headers at the cache boundary and use the owned identity for Vary followers, variant storage and queued refreshes, while preserving original-request loopback replay. Cover rewritten Vary headers in RFC and dynamic-backend force mode, concurrent followers, warm hits and background refreshes. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
|
Docker image "registry-write.opensource.zalan.do/teapot/skipper:2d787a53fbb78502dade261fa75fc8cbeee9591c" is not based on an approved base image. Any production deployment relying on this image will be blocked. To create a compliant Docker image of your application, you must reference an allowed Docker image as its base image in your Dockerfile. This base image must come from the Zalando Container Registry namespace |
Distinguish L2 read errors from clean misses and retain eligible local responses only as stale-if-error candidates pending an origin failure. Preserve original response freshness and SIE metadata separately from the L1 warming deadline. Cover transport and HTTP failures, fresh L2 precedence, clean misses, original SIE boundaries, queued refreshes and Vary isolation. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
bf309bc to
f111f35
Compare
Group dispatch, Vary, and stale-if-error coverage by the fix it protects. Drop repeated status grids, benchmarks, and the Contentful route-order contract tests. Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
d800aef to
4ce1e56
Compare
Upstream docs should stay product-agnostic. CONTEXT.md glossary additions for cache tiers are out of scope for this PR. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Larry D Almeida <20266078+larry-dalmeida@users.noreply.github.com>
Summary
1. Fix Dispatch/coalescing & follower bodies: Singleflight normalization was missing; coalesced requests didn't properly share bodies, forcing multiple origin fetches for identical concurrent requests.
2. Fix Vary/304 handling: Variant isolation failed to prevent same-Vary entries from shadowing fresh variants; 304 responses discarded entity representation instead of preserving it.
3. Fix Stale-if-error & refresh retention: SIE didn't properly retain last-good responses when backend returned 500/502/503/504 or disconnected; failed refreshes were lost.
4. Fix Backend phase timeouts: Root
Optionstimeout fields weren't wired into the cache filter's transport; configured budgets were ignored.5. Fix Expired L1 shadowing fresh L2: L1 freshness gate checked
!IsStale(), which was true for entries in the stale-while-revalidate window; this bypassed fresh shared L2 and forced unnecessary origin calls.How to verify
Review the five commits in order:
cache_timeout_test.gochecks option mapping, header-timeout stale preservation and recovery. These are phase budgets, not one end-to-end deadline.Want to run it yourself?
Setup and complete replay commands
After the linked harness/prerequisite setup, run from the harness root (
$PROMis the native Prometheus binary configured there):Screenshots
These panels illustrate the pressure/queue workload. Queries, hashes and capture provenance.
Cache evictions: 196 actual evictions matched 196 absent cache-only probes in the workload.
Refresh errors / dropped jobs: the workload independently observed three queue-overflow drops.
Refresh queue depth: reached the configured capacity of 256, then drained.
References & Additional Context