tempesta icon indicating copy to clipboard operation
tempesta copied to clipboard

Random Backend Forwarding in Pipelined Requests

Open symstu-tempesta opened this issue 7 months ago • 3 comments

Describe the issue If we have several pipelined requests — for example: GET 0, POST 1, GET 2 — the POST 1 request should block the last one, GET 2.

We assume that POST 1 (or any other request marked as non-idempotent) may modify backend data, which means the result of the following GET 2 could be different.

Therefore, we must wait for the response of POST 1 before forwarding GET 2.

At the moment, pipelined requests do not maintain a consistent execution order and appear to be forwarded arbitrarily.

Expected Behavior If there is a non-idempotent request in the pipeline, we must strictly follow the sequence of execution.

To Reproduce https://github.com/tempesta-tech/tempesta-test/pull/808 ./run_tests.py t_pipelining.test_pipelining

Version or commit hash Current master b150f736fd4372dfbb0b03b2b777cef4fed41f6e

Related to: https://github.com/tempesta-tech/tempesta/issues/682 https://github.com/tempesta-tech/tempesta/issues/419

symstu-tempesta avatar May 06 '25 23:05 symstu-tempesta

pipelined requests do not maintain a consistent execution order and appear to be forwarded arbitrarily.

@symstu-tempesta Do we have a corresponding test for HTTP/2, i.e. when GET 0, POST 1, GET 2 are sent in consequent streams, do we see that GET 2 still can be executed before POST 1?

krizhanovsky avatar May 07 '25 10:05 krizhanovsky

pipelined requests do not maintain a consistent execution order and appear to be forwarded arbitrarily.

@symstu-tempesta Do we have a corresponding test for HTTP/2, i.e. when GET 0, POST 1, GET 2 are sent in consequent streams, do we see that GET 2 still can be executed before POST 1?

I’ve added H2 tests for pipelined non-idempotent requests, and the same behavior persists

symstu-tempesta avatar May 07 '25 13:05 symstu-tempesta

I strongly believe that this used to work as intended. Perhaps finding when it broke (bisect?) would be a good way of going at it.

keshonok avatar May 07 '25 13:05 keshonok