3

I have a production and staging website on the same server and I want each of them to use separate RabbitMQ instance. I'm using one RabbitMQ installation and I'm running two RabbitMQ instances, where each of the two RabbitMQ instances is set up to use different configuration through environment variables.

In this setup, can the two RabbitMQ instances share the same epmd process? Or is it better to run two epmd processes on two different ports to have completely separated infrastructure for staging and production?

ozren1983
  • 1,891
  • 1
  • 16
  • 34

2 Answers2

6

Yes they can. You need it if you want to create a cluster.

From: http://erlang.org/doc/man/epmd.html

This daemon acts as a name server on all hosts involved in distributed Erlang computations

BTW I think that you shouldn't have Staging and Production in the same machine.

Even if you will decide to put both in the same machine, you don't need two epmd services.

Pang
  • 9,564
  • 146
  • 81
  • 122
Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
2

I know that, in the question title, it says same server and epmd, but to achieve what you want would be much much easier if you use Docker images. Basically, it's cleaner and safer. One Docker image is independent of the others (unless, of course, you are making a cluster etc). Hell, in this way, you could even have N clusters on one server, let alone N RMQ instances.

Pang
  • 9,564
  • 146
  • 81
  • 122
cantSleepNow
  • 9,691
  • 5
  • 31
  • 42