开发者

NoSQL / Redis Scaling Theory

开发者 https://www.devze.com 2023-03-27 16:13 出处:网络
Is it more effici开发者_StackOverflow中文版ent for a key-value data store such as Redis to handle X number of requests over 1 client connection or 1 request per client over X number of client connecti

Is it more effici开发者_StackOverflow中文版ent for a key-value data store such as Redis to handle X number of requests over 1 client connection or 1 request per client over X number of client connections?


In theory reusing a connection means that less work is required on the connection overhead so it is technically more efficient. However, in practice latency means that using a single connection is dramatically slower with the server being idle most of the time.

Redis performance is almost never limited by the CPU - it can quite easily serve 100 requests on separate connections in the time it would otherwise spend waiting for the second request on a single connection.

0

精彩评论

暂无评论...
验证码 换一张
取 消