Closed mkzz115 closed 2 weeks ago
Normally, compared to socket operations between client and Redis, fetching connection from the underlying connection pool is negligible. However, if you have too many threads competing a small number of connections, these threads might block waiting others.
In order to mitigate the problem, you can try setting a large number of pool size. However, IMHO, the best solution is to redesign your application to use Redis pipeline to make it more efficient. Also you can try the Async interface, which does not block on IO operations.
Regards
Thank you so much, I changed pool size, and use pipleline can solve it, maybe my redis have some slow query (other modules), I will use another instantion in the future.
My Project use connect pool to request redis, and I set pool size is 5, sometimes I find request redis to slow, perhaps more than 5 threads request it, blocked.
I don't want it to block my request, and I want it to be as efficient as possible.
Do you have some suggestions?