开发者

Multiple clients load distribution with redis

开发者 https://www.devze.com 2023-04-11 04:05 出处:网络
We are using redis as a queue for asynchronous processing of jobs. One application pushes jobs to redis (lpush), other application reads the redis queue (blpop) and processes the same. We wanted to sc

We are using redis as a queue for asynchronous processing of jobs. One application pushes jobs to redis (lpush), other application reads the redis queue (blpop) and processes the same. We wanted to scale the processing application so we ran two different instances on 2 different machines to process the jobs from queue, but we observed that one instance is taking 70% of the load from queue while other instances processes only a meagre amount. Is there any well defined strategy or configuration in using multiple clients with redis and开发者_高级运维 proper load sharing? Or we have to maintain separate queues for the two instances and push the requests in a round robin manner?

0

精彩评论

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

关注公众号