0

I have a web site hosted in an EC2 instance (2008 r2 + iis7.5 + sql server). I put one linux box running RHEL with varnish. After some configuration trail and error, I found a configuration that works.

Now I want to duplicate the varnish boxes to other availability zones, but continue to pull the pages from the original windows box.

It is my understanding that I can put the varnish boxes in different zones and pull from the windows box via it's external IP. But what do I need to do in order for each user to receive content from the box physically closest to them? Is this even possible?

Thank you!

2 Answers2

2

You would need to use a DNS provider that provides a geo-locational lookup services. They pretty much do this

  • user enters host
  • request hits their dns servers
  • they lookup the users IP address against a ip->geo database to get the users rough area of the world
  • They return the IP address of the EC2 instance that is closer to them based on the IPs you enter for that host

The company I have worked for used http://dyn.com/dns/ They are pricey for their geo-dns service. I think it's only included in their $200 a month plan.

EDIT

If you want to roll your own dns service to do this, here is a post with some good info

Is there any DNS that supports Geo-location / Directional DNS?

Mike
  • 22,748
1

Why would you not use Amazon's CloudFront for this? You're already trusting Amazon, and they support cusotm origins and caching dynamic objects.

Don't build your own CDN, there's no way you can do it cheaper or better than the CDNs already out there.

rmalayter
  • 3,832