Hostnames in backend definition...

david raistrick drais at
Tue Dec 13 18:28:08 CET 2011

On Tue, 13 Dec 2011, Roberto O. Fernández Crisial wrote:

> Hugo,
> Have you tried Elastic IP? I think this resolves the first problem you have.

First - elastic IP doesn't resolve the the core problem (lack of DNS ttl). 
This only maps an static -external- address to a still dynamic internal 

For me - I configure (an elastic 
IP) as a backend.  Both varnish and the backend are internal to EC2.

Varnish stores this IP because of the AWS split horizon magic: has address

Now, I replace the instance that is running on that EIP - the old 
internal IP gets picked up by another customer, and they start recieving 
my traffic.

The new internal IP behind the EIP is now, but he never gets 
any traffic.

I have to reload, then unload, the varnish config (or stop/start varnish) 
to get varnish to be aware of the change.

For the OP's situation, he's using Amazon's Elastic Loadbalancer solution, 
which has neither a static external nor static internal IP address - 
amazon clearly states that you should -only- use the cname to send traffic 
to ELB because they perform migration and scaling operations behind the 
scenes that the customer is never informed of.

david raistrick
drais at   

More information about the varnish-misc mailing list