简体   繁体   中英

How to setup a clustering of a queue servers for beanstalkd?

We've two Queue Servers, both attached to the application. so far Server 1 receives all the queued jobs and processed it. I would like to set up a Cluster so that the load is spread across 2 servers. anyone can suggest how to setup a cluster.

Thanks.

Beanstalkd doesn't offer this feature.

Alternatives are:

  • you setup a soft sharding to route requests to queue A or B
  • you can use alternatives like Redis Queue, Cloud Pub/Sub from Google Cloud Platform

Beanstalkd in a single instance setup can support multiple TCP connections, and generally outperforms Redis. Below are a few benchmarks, however benchmarks are subjective.

Benchmarks References

So a vertical scaling is usually sufficient.

The problem however, is availability, when the single beanstalkd instance goes away.

You can checkout coolbeans, this project is in alpha. It provides a replicated beanstalkd https://github.com/1xyz/coolbeans

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM