Closed maoe closed 9 years ago
Hey @maoe,
The bunny library does not play well w/ EventMachine, so it's not really a viable option. To remove a load balancer (SFOF) from the equation, I just threw together https://github.com/sensu/sensu-transport/pull/5 \o/ I'll do further work on it and testing, tomorrow.
@portertech Nice! I'm really looking forward to it.
Going to close this, as Sensu currently supports connecting to a random broker in a cluster :+1:
Hi @portertech ,
Could you please explain more about "The bunny library does not play well w/ EventMachine"? Did you find any critical issue with the library?
We try to create an extension to push events to RabbitMQ. Bunny is the first option we try. It is working right now. I have not seen any issue so far. There are some concerns after seeing this thread. Would you please advise whether we should go with "Bunny" or switch to "amqp"?
Thanks.
@dreamerz Bunny is not an eventmachine library, meaning that it blocks the event loop every time it does an IO operation, e.g. sending or receiving a message.
@dreamerz @maoe Sensu currently supports configuration of multiple RabbitMQ cluster brokers https://sensuapp.org/docs/latest/rabbitmq#configuring-sensu-for-a-rabbitmq-cluster
Thanks @portertech . :thumbsup:
Could we switch from the amqp library to the bunny library?
The motivation for this is as follows:
Suppose we have a RabbitMQ cluster, if a sensu-client connects to one of the nodes and if the connection gets failed the sensu-client fails to post results, of course. To circumvent the issue, we need to put HAProxy in front of the RabbitMQ cluster. Also in order not to introduce a new SPOF, we need at least a pair of HAProxy and run Keepalived to manage VRRP.
I initially thought there must be a way to do the failover in the client side rather than having to do a lot of sysadmin work. So I asked an author of the amqp library if the library can handle multiple hosts. He replied that the new bunny library supports multiple hosts in master. This is why I'm wondering if we could switch to bunny.
This functionality should dramatically simplify our setup described in this thread.
Any thoughts?