Closed segment11 closed 4 months ago
explain in example
1、redis client send cmds [cmd1、cmd2、cmd3、cmd4、cmd5、cmd6] to proxy in pipeline 2、proxy will route to redis-server1 [cmd1、cmd3、cmd4] and redis-server2 [cmd2、cmd5、cmd6] in two connection in pipline in sharding logic( custom sharding or redis-cluster sharding)
1、non-blocking cmd will use the shared connection 2、blocking cmd will use the no-shared connection
explain in example
1、redis client send cmds [cmd1、cmd2、cmd3、cmd4、cmd5、cmd6] to proxy in pipeline 2、proxy will route to redis-server1 [cmd1、cmd3、cmd4] and redis-server2 [cmd2、cmd5、cmd6] in two connection in pipline in sharding logic( custom sharding or redis-cluster sharding)
I've thought the first case,there ares 2 redis-clients (client A/client B send cmds to proxy (proxy A) not in pineline, client A send [cmd1、cmd2、cmd3], client B send [cmd4、cmd5、cmd6],can proxy A just send all thease commands [cmd1..cmd6] once in pineline to upstream redis-server A?
In earily version, proxy's logic is what you want, but it means proxy should use a queue to buffer cmds, and run in producter-consumer thread model, it will cause frequent context switching in the CPU
Module: camellia-redis-proxy Content: As redis client send to redis server in pipeline mode, performance is much better. Can camellia-redis-proxy just use few connection to redis-server, send commands in batch?
Can blocking commands use this shared connection? Will latency decrease badly?