VHOST IP addresses

I’m setting up my DNS records. Question: Will the IP that a VHOST resolves to ever change?

Or am I safe using that IP when creating an A record?

@hylas

the IP can change since Aptible uses Elastic Load Balancers. Behind the scenes, ELBs are implemented as a set of at least two EC2 instances, each with a public IP.

If an instance ever fails, a new one will replace it, and the IP address will change

Yeah I figured something like that was probably the case. What is best in terms of getting an A record to point at my app then?

Hey @hylas if your DNS provider supports ALIAS pseudo-records (DNSimple does, for example), you could do that

Is the idea to serve traffic over the naked domain, or will it redirect to www or another subdomain?

Well I’ve got 3 instances

staging.com and production.com both receive traffic from many subdomains (customer.production.com)

The options are to use a DNS provider that supports ALIAS records or point at the IP address (but you’ll need to make a DNS change whenever the VHOST’s IP changes)

Note: ALIAS is different from a CNAME record; it’s not a real record type. Rather it takes a domain name as a value (like a CNAME record), but then evaluates it at real-time and returns an IP address, as though it were an A record