How do I set up ElasticSearch nodes on EC2 so they have consistent DNS entries?


(Ryan V) #1

I have 3 ElasticSearch nodes in a cluster on AWS EC2. My client apps use
connection pooling and have the public IP addresses for all 3 nodes in
their config files.

The problem I have is that EC2 seems to occasionally reassign public IP
addresses for these instances. They also change if I stop and restart an
instance.

My app will actually stay online since the connection pool will round robin
the three known IP addresses, but eventually, all three will change and the
app will stop working.

So, how should I be setting up an ElasticSearch cluster on EC2 so that my
clients can continue to connect even if the instances change IP addresses?

  1. I could use Elastic IPs, but these are limited to 5 per account and I
    will eventually have many more than 5 nodes (different environments, dev,
    staging, test, etc.)
  2. I could use Elastic Load Balancers, and put one node behind each ELB,
    but that seems like a pretty hacky solution and an improper use of load
    balancers.
  3. I could create my own DNS entries under my own domain and update the
    DNS table whenever I notice an IP address has changed, but that seems
    really error prone if no one is checking the IPs every day.

Is there an option I'm missing?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/56aa0943-23d3-46c7-b5ae-210f08af73f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2