[rabbitmq-discuss] Good practice to work with rabbit cluster?

57 views
Skip to first unread message

stone

unread,
Mar 12, 2012, 6:26:59 AM3/12/12
to rabbitmq...@lists.rabbitmq.com
Hi there!

Is there any good practice regarding how to write self-managed AMQP client (Erlang based)
Here is what I need to accomplish:
1. I don't what to hard-code hostname/ip address of rabbit-server,
using a configuration file would be a simple solution, but, is there a better way?

2. Client should be able to get the rabbit server "running cluster" information.
so if the current connection is broken, it could try another one in the cluster,
then perhaps update the "running cluster" list from the new node;

Brs
/stone

Carl Hörberg

unread,
Mar 12, 2012, 8:20:32 AM3/12/12
to stone, rabbitmq...@lists.rabbitmq.com
what about a multi A DNS record (with low ttl), which you update when
a server is down/up?

> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

stone

unread,
Mar 12, 2012, 8:28:30 AM3/12/12
to Carl Hörberg, rabbitmq...@lists.rabbitmq.com
I'm not sure how DNS server works, is it possible for the DNS server to detect the failure of a specific port? i.e. to find out if rabbit is down, when the OS is still up and running.

2012/3/12 Carl Hörberg <carl.h...@gmail.com>

Carl Hörberg

unread,
Mar 12, 2012, 8:35:11 AM3/12/12
to stone, rabbitmq...@lists.rabbitmq.com
no, you have to manually administer the dns (or automatically through
some heartbeat stuff interacting with your dns provider api.. )

i don't know how the client implementations are, but they could try to
connect to the first A record, if that fails try the next one and so
forth.. (like the way many web browsers does)

stone

unread,
Mar 12, 2012, 8:46:34 AM3/12/12
to Carl Hörberg, rabbitmq...@lists.rabbitmq.com
seems better than config file. thanks Carl.

2012/3/12 Carl Hörberg <carl.h...@gmail.com>

Jerry Kuch

unread,
Mar 12, 2012, 10:50:34 AM3/12/12
to stone, rabbitmq...@lists.rabbitmq.com
This is also a pretty natural thing to do with a system like Zookeeper
from the Hadoop project, although it would require Rabbit to grow something
like a plugin that either had an Erlang Zookeeper client, or used a port
or jinterface to the native C or Java Zookeeper clients, to do the necessary
work...

Best regards,
Jerry

stone

unread,
Mar 12, 2012, 11:58:17 AM3/12/12
to Jerry Kuch, rabbitmq...@lists.rabbitmq.com
Yeah, that's probably a decent solution too.
Another similar tool is doozer https://github.com/ha/doozer
I've never used either of them though.

How about a deamon constantly pull the information from
command line "rabbitmqctl status" ?
I mean comparing to a plugin, will it cause any performance impact to rabbit-server?

Brs
/stone

2012/3/12 Jerry Kuch <jer...@vmware.com>

Jerry Kuch

unread,
Mar 12, 2012, 12:00:54 PM3/12/12
to stone, rabbitmq...@lists.rabbitmq.com
Using rabbitmqctl status is one thing you could do. The management HTTP also has
an "aliveness check" method on it that you could poke at some reasonably non
obnoxious frequency. See here:

http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v2_2_0/priv/www-api/help.html

It declares a test queue, then publishes and consumes a message, and is
expressly intended to allow monitoring tools a not too high impact way
to make sure a broker is not only up, but also not addled in some way
that is totally preventing it from doing useful messaging work.

Reply all
Reply to author
Forward
0 new messages