3

I just have a basic question. What is the recommended way to handle automatic host discovery in an AWS VPC? I have these Servers running and I want to figure out a neat way to skip having to configure the /etc/hosts file on every machine to get them to talk to each other. I know I can enable DNS support for my VPC but that does not resolve host names that the software I am running generates.

I'm building an high availability cluster of RabbitMQ (w/ autocluster plugin) using autoscaling groups with launch configs, but they don't cluster unless I add all the peers to the hosts file, i.e. for host rabbit@ip-xxx-xxx-xxx-xxx I would have to add the resolution of "Private IP" and host name "ip-xxx-xxx-xxx-xxx".

J Selecta
  • 35
  • 7

1 Answers1

3

Check out this post for the many ways to do Host / Service discovery on AWS. Many of the methods will be suitable for your usecase.

Also consider using managed Amazon MQ instead of building and managing your own RabbitMQ cluster. It comes with the usual benefits of a managed service - you only use the service and don't have to care about all the low-level stuff like OS patching, clustering, fail overs, service discovery, etc. There is a nice tutorial Migrating from RabbitMQ to Amazon MQ.

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81