I have been looking at the code in Eureka that looks for an available elastic IP to bind to. If we have multiple Eureka servers in the same availability zone that are started as part of an autoscaling group, it looks like when both servers start up they will both try to bind to the first available elastic IP. If the timing is right, one will associate with it, and then the next server will associate with it, which will unbind it from the first server. After the retry interval, the first server will then bind with the other remaining EIP.
Am I understanding this behavior correctly? And if yes, is there a standard way to deal with this? Should we stagger the starting of instances in the ASG? Just leave it as is and it will bind both servers after the retry interval? Or something else?
Thanks,
Jeff