diff options
author | dormando <dormando@rydia.net> | 2023-03-24 12:56:20 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-03-24 12:56:20 -0700 |
commit | 923df263b5e34449acee2ce24906653c7d8808e1 (patch) | |
tree | 810daad06d0953a9b0bc730a7290687b2cba240f /proxy_network.c | |
parent | 55cda5ce93234935fce88437083b99333d8a23dc (diff) | |
download | memcached-923df263b5e34449acee2ce24906653c7d8808e1.tar.gz |
proxy: fix bug ignoring -R setting for proxy reqs
The client connection state machine loops through a few states when
handling pipelined requests.
To start:
conn_waiting -> conn_read -> conn_parse_cmd (execution)
After conn_parse_cmd, we can enter:
conn_nread (read a mutation payload from the network) -> conn_new_cmd
or directly: conn_new_cmd
conn_new_cmd checks the limit specified in -R, flushing the pipeline if
we exceed that limit. Else it wraps back to conn_parse_cmd
The proxy code was _not_ resetting state to conn_new_cmd after any
non-mutation command. If a value was set it would properly run through
nread -> conn_new_cmd
This means that clients issuing requests against a proxy server have
unlimited pipelines, and the proxy will buffer the entire result set
before beginning to return data to the client. Especially if requests
are for very large items, this can cause a very high Time To First Byte
in the response to the client.
Diffstat (limited to 'proxy_network.c')
0 files changed, 0 insertions, 0 deletions