We have more servers than static IPV4 aws is allowing us to use.
This means that some of our servers will change IP when we change or restart our servers.
How can I handle this so that the DNS will always work? Do I just need to buy new IP addresses?
I see the following options:
Dynamic DNS.
The idea is that we have a special agent installed on EC2 instance,
that after each IP change sends it to DNS registry that updates DNS
record with new IP.
Service registry/discovery.
We register our services in service registry/discovery. In this case we don't care about IPs, we care about their DNS names.
When each service starts, it updates DNS record for it in the registry.
Have more static IPs :-)