Why does http pipeline say that only idempotent requests can be pipelined?

when looking up http pipeline, I found this sentence. I don"t understand why non-idempotent requests can"t be pipelined.
is it because the client cannot guarantee the order in which each request arrives at the server when pipelining the request?

Apr.01,2021

idempotency is the effect of multiple executions on resources, just as one execution has on resources.
idempotent guarantees that all requests in pipeline do not have to care about the order in which they are sent and the order in which they are executed when they arrive at the server, and even if there are multiple requests, the result is always the same.
conversely, if it contains a non-idempotent request, there are two requests, the first is to update the user Zhang San information, and the second request is to obtain the updated Zhang San latest information. They are executed on the server side in order: 1 first, then 2. However, the latter request will not wait until the previous request is completed before executing , that is, request 2, which may obtain the latest information of Zhang San, will first execute , so that the returned information will not be expected.


rfc7230 connection Management pipeline points out that the server gets a set of requests from pipeline and can process them in parallel with (MAY).

I think parallel processing can lead to unexpected results if it contains non-idempotent requests.


figured out that the so-called pipeline requires idempotency because, for example, the three requests are sent in turn. If 1 and 2 and 3 are not idempotent, that is, 2 may depend on the return of 1, 3 may depend on the return of 1 and 2, in which case it cannot be sent through pipeline

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1525-2345.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1525-2345.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?