v0.27.77
Changes
fix: deduplicate fifoWithBody and lifoWithBody in the route preprocessor (#4217)
Registry.Do keys the queue by route id, so fifo() and
fifoWithBody() on the
same route share one queue, same for lifo() and lifoWithBody(). The
preprocessor drops all but the last instance to avoid that, but it only
counted
filters.FifoName and filters.LifoName, so the WithBody variants were
never
removed. Both then call Wait() on the same queue and one request takes
two
slots.
A single request to an idle proxy rejects itself:
./bin/skipper -inline-routes='r: * -> fifoWithBody(1, 0, "1s") -> fifoWithBody(1, 0, "1s") -> "http://127.0.0.1:9001"'
curl -s -o /dev/null -w '%{http_code}\n' localhost:9090
503lifoWithBody twice blocks for the timeout and gives 502, and fifo()
followed
by fifoWithBody() gives 503 too. With fifo() twice it's 200, since
that pair
already gets deduplicated.
Counting per queue family instead of per filter name. lifoGroup()
stays out of
it, that one is keyed by group name.
How to test
go test ./scheduler/... ./filters/scheduler/...
Four cases added to TestRegistryPreProcessor. On master:
--- FAIL: TestRegistryPreProcessor/two_fifoWithBody
--- FAIL: TestRegistryPreProcessor/two_lifoWithBody
--- FAIL: TestRegistryPreProcessor/fifo_and_fifoWithBody_share_a_queue
--- FAIL: TestRegistryPreProcessor/lifo_and_lifoWithBody_share_a_queue
ref #4188
Multiarch Docker image
Multiarch Docker image is available in GitHub's docker registry:
docker run -it ghcr.io/zalando/skipper:v0.27.77 skipper --help