Setting up a GeoDNS server, are custom nameservers required/adviced?

January 16, 2017 511 views
DNS

So i'm looking to setup a DNS server that picks the closest Varnish caching server available based on what country the request is coming from.

This tutorial looks very good however i'm curious if running custom nameservers is required and if not, adviced. Can I also use Namecheaps nameservers and point domains to my GeoDNS server from Namecheaps admin panel?

I'm also curious if I would have to setup records for every country possible in order to get optimal geo distrubtion going. For instance when I have 1 server in Germany and 1 in The Netherlands and someone has a geo location of Poland (e.g pol.geo.example.com), do I need to manually configure pol.geo.example.com to go to the German server IP. If so, I would love some tips on how to deal with the matter.

1 Answer

@braminator

Instead of setting up a complex DNS configuration, you may want to look in to using NGINX to simply proxy to the closest Varnish server using GeoIP. The setup is less detailed and easier to replicate.

How To Use Nginx as a Global Traffic Director on Debian or Ubuntu

You'll still need to create individual servers for each location you wish to handle, though if you look at the guide, there's also a default server, which means for instances where there's not a target defined, the default server will be used.

by Alex Soban
In this guide, we'll configure Nginx to detect and redirect customers to a subdomain that points to a more geographically appropriate server.
Have another answer? Share your knowledge.