RabbitMQ multiple network setup?

481 views
Skip to first unread message

tony hughes

unread,
Jul 29, 2015, 9:51:01 PM7/29/15
to rabbitmq-users
Hi All,

I'm looking at doing a Rabbit MQ setup with 2 nodes as below


                                                         F5 (Load Balancer)

Node 1                                                                                                             Node 2 
         Network 1                             (F5 Facing NIC)                                               Network 1  192.168.240.x
         Network 2                             (Replication network)                                        Network 2   192.168.238.x
         Network 3                             (Member network Pool for F5)                           Network 3   192.168.239.x
        Network 4                               (internal Facing Network)                                 Network 4   10.130.x.x

Networks will be across both machines with each Network/NIC being within a separate VLAN as well for segregation. My main questions is how i perform the network segregation for Rabbit? i.e. how do i tell rabbit to only use the replication network for replication network etc.?

Jean-Sébastien Pédron

unread,
Jul 30, 2015, 7:04:08 AM7/30/15
to rabbitm...@googlegroups.com
On 30.07.2015 03:51, tony hughes wrote:
> Networks will be across both machines with each Network/NIC being within
> a separate VLAN as well for segregation. My main questions is how i
> perform the network segregation for Rabbit? i.e. how do i tell rabbit to
> only use the replication network for replication network etc.?

Hi!

For the AMQP listen address/port (F5 facing NIC I guess), you can use
the 'tcp_listeners' configuration parameters in rabbitmq.config [1]. IT
allows to specify a list of IP address(es) to listen on.

For the replication network, queue mirroring goes through Erlang
inter-node communication. You need to start epmd manually and use the
-address argument [2]. epmd must be started before RabbitMQ.

You also need to set the Erlang kernel inet_dist_listen_options
parameters [3][4]. You can put something like the following line in
/etc/rabbitmq/rabbitmq-env.conf (I assume you use Linux):

RABBITMQ_SERVER_START_ARGS='-kernel inet_dist_listen_options
[{ip,"192.168.238.10"}]'

You need to make sure the node's hostname used by Erlang resolves to a
Replication network IP address.

I suppose "Member network Pool for F5" is the interface used by the load
balancer to determine if a node is alive. You can add this interface to
'tcp_listeners' so RabbitMQ will listen to both the "F5 facing NIC" and
this one.

And again, I suppose "Internal facing network" can be listed in the
'tcp_listeners'.

[1] http://www.rabbitmq.com/configure.html
[2] http://www.erlang.org/doc/man/epmd.html
[3] http://www.erlang.org/doc/man/kernel_app.html#id77484
[4] http://www.erlang.org/doc/man/gen_tcp.html#listen-2

--
Jean-Sébastien Pédron
Pivotal / RabbitMQ

Stiwan Chinazki

unread,
Aug 13, 2015, 2:58:18 AM8/13/15
to rabbitmq-users
Hi,

you say that epmd has to be started manually... Is there a way to automate this?

Also, what does "node's hostname used by Erlang resolves to a Replication network IP address" mean? 
If my host is called node1.mydomain.com (`hostname` in shell) - it resolves to my public ip, but not to my internal network ip. Do i need to modify /etc/hosts?

Best,
Stiwan
Reply all
Reply to author
Forward
0 new messages