From 6167ce5e860e46ee783f32afddec95994d7e1e57 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Sun, 1 Nov 2026 15:07:16 +0000 Subject: [PATCH] cache: Wait for the proxy before the first request The first request fired as soon as compose returned; front-envoy was one second old and still loading clusters, so curl got a connection reset (exit 56). Probe the never-cached private response until the proxy answers, so the first cacheable request is still served by the origin. Signed-off-by: Ryan Northey --- cache/verify.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cache/verify.sh b/cache/verify.sh index 418eb384..88e5b3ec 100755 --- a/cache/verify.sh +++ b/cache/verify.sh @@ -61,6 +61,10 @@ check_from_origin() { } +# Wait for the proxy to come up, probing a response that is never cached so +# the first cacheable request below is still served by the origin. +wait_for 10 bash -c "responds_with 'private response' http://localhost:${PORT_PROXY}/service/1/private" + run_log "Valid-for-minute: First request should be served by the origin" response=$(curl -si "localhost:${PORT_PROXY}/service/1/valid-for-minute") check_from_origin "$response"