Recommendation for value when VMs are prone to get replaced with change of IP

As per, the value can be an IP, hostname or special value like _eth0_

In our production environment, the VMs are prone to get replaced anytime without notice such that their IP address changes, but hostname does not.

What is the best setting of in such a scenario?
The hostname is kind of long (60+ chars) and we would like to avoid it is possible.
But we also want the replaced VM (data-disk still remains as such with the VM as its networked storage) to re-join the indexes it was part of.

Why not just use the interface identifier and not worry about it?

I will try to give a small example to clarify.
Let us say previously the node was bound to IP1.
After replace, the IP became IP2 and the new node is bound to IP2 now.
The hostname has remained unchanged during the replace.

My concern is that will ES recognize that IP1 is gone for good and start using IP2 from that point onwards without any issues? I guess I saw some article which talks about automatic load-balancing of shards but it would be good to confirm a specific use-case if someone has experience dealing with it.

Is it better to bind to the unchanging hostname? Or ES is able to handle the IP-change seamlessly?

Yes, it will.

1 Like

Thank you Mark !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.