6th September 2008
|
#1 (permalink)
|
Trusted User (393) Platinum User
Join Date: Jun 2006
Posts: 384
|
GeoDNS
I've got machines in the UK and the US, and am interested in using geodns to ensure visitors go to the nearest DC. However, the external geodns services I've had quotes from so far are priced per request and simply work out far too expensive for the volumes involved.
Someone suggested having the primary nameserver in the UK and the secondary in the US, and configuring each to point at their local DCs; they said routing rules would ensure people used the response from their nearest one. However, that really really doesn't sound right to me - I thought nameservers are used in no particular order, and one would be chosen before routing became an issue. Surely it's not common practice to query both simultaneously and use the first response?
I imagine real geodns services use anycast to get routed to the closest nameserver, which then does a lookup on the requesting IP to find their geographical zone, then maps that to the closest IP for that zone. A quick google found a geodns patch for BIND that seems to do just that (skipping anycast), but has anyone here tried it?
Can anyone recommend a good geodns solution, either one I can run myself on the cheap, or a third-party service that doesn't cost the earth?
__________________
Registered User
|
|
|
6th September 2008
|
#2 (permalink)
|
Join Date: Jun 2007
Posts: 950
|
I made one once using perl, theres a dns module for perl, it took about an hour tops 
__________________
Forum Administrator
|
|
|
6th September 2008
|
#3 (permalink)
|
Join Date: Apr 2004
Location: Newark, UK
Posts: 796
|
Quote:
Originally Posted by burble
I imagine real geodns services use anycast to get routed to the closest nameserver, which then does a lookup on the requesting IP to find their geographical zone, then maps that to the closest IP for that zone. A quick google found a geodns patch for BIND that seems to do just that (skipping anycast), but has anyone here tried it?
|
ClamAV use it to redirect you to a close signature mirror and I'd guess theres lots of other people using it too. I think PowerDNS can also do it.
Just remember its based off the DNS server that makes the request rather than the client.
ChrisB.
__________________
Chris Burton
8086 Limited (Company No.: 06336617 VAT No.: 920 5102 75)
Ever wanted to know who uses a DNS or MX server ? with DNS History you can find out.
__________________
Web Host - Certified Member
|
|
|
7th September 2008
|
#4 (permalink)
|
Join Date: Jan 2006
Location: Leicester, UK
Posts: 460
|
There's a powerdns backend that does a good job of this, and it's free. I've not got a link, but a bit of googling should help you. I think it's on blitzed.org or something
__________________
No-Wires.co.uk - sales@no-wires.co.uk
VPS Servers / Co-location / Dedicated Servers / ADSL
__________________
Web Host - Certified Member
|
|
|
7th September 2008
|
#5 (permalink)
|
Join Date: Jul 2002
Location: Cluj-Napoca, Transylvania & Didsbury, UK
Age: 23
Posts: 2,030
|
Quote:
Originally Posted by burble
I imagine real geodns services use anycast to get routed to the closest nameserver, which then does a lookup on the requesting IP to find their geographical zone, then maps that to the closest IP for that zone. A quick google found a geodns patch for BIND that seems to do just that (skipping anycast), but has anyone here tried it?
Can anyone recommend a good geodns solution, either one I can run myself on the cheap, or a third-party service that doesn't cost the earth?
|
We're running the GeoDNS patch for Bind on a few VPS's for customers. Find a small VPS and a friendly provider and they'll set it up for you free/cheaply and it'll cost you very little time to maintain, and bind requires very little memory so the VPS should be cheap.
Alternatively, at www.domain.com you can have a script which detects the users location and redirects them to us.domain.com or uk.domain.com depending on their IP. This can easily be achieved using many methods such as perl modules or Apache's mod_geoip.
__________________
Andrew Cranson, Director of Operations & Parallels Specialist
Layershift :: UK & US hosted Domains, Shared, Reseller, VPS, DDS, Dedicated, Managed, Collocation
Company Number: 6036217 / VAT Number: GB903034962
Virtuozzo Containers/Plesk/SiteBuilder Technical Services: Consultancy, upgrades, licensing & admin
Parallels Platinum Certified Support Provider & Technology Partner
Unlike many providers, we offer True 24x7 Technical Support - peace of mind around the clock!
__________________
Web Host - VIP Member
|
|
|
8th September 2008
|
#6 (permalink)
|
Join Date: Sep 2008
Posts: 26
|
Try something like ip2location.com and have a simple redirect script as mentioned by Cranky. This is simple enough in PHP, here is something for you. Feel free to use it:
PHP Code:
<?
$surfersip = $_SERVER['REMOTE_ADDR'];
if (preg_match("/192.168.0/",$surfersip)) {
header('Location: http://uk.abc.com/');
} else if (preg_match("/192.168.1/",$surfersip)) {
header('Location: http://usa.abc.com/');
} else {
header('Location: http://www.abc.com/i_dont_know_where_you_are.html');
};
?>
This will be more accurate as its not dependant on which DNS server your customer is using, its based on there actual IP and also allows you to geographically load balance.
You can also try some free solutions available but there not as accurate in my experience. Also remember the usual limitations on location determination which are Satellite Internet, VPN and Mobile Broadband (which is backhauled to your home network which is a double edged sword).
Stuart
__________________
BlueWave Communications Ltd
Colocation & Manchester BGP / Static Bandwidth - £10 /Mbit
100% Uptime SLA | No Minimum Commitment
__________________
Web Host (Standard Member)
Last edited by bluewave : 8th September 2008 at 02:20 PM.
|
|
|
8th September 2008
|
#7 (permalink)
|
Trusted User (393) Platinum User
Join Date: Jun 2006
Posts: 384
|
Thanks for all the replies!
I'm looking at this for both download speed and load-balancing, so would prefer to do it at the dns level; that way, by the time it hits the web server it will already be in the right data centre.
From your positive comments, it looks like I should be ok going with powerdns or the bind patch - will probably try that out first, as I'm already using bind at the moment.
Thanks for all the help!
__________________
Registered User
|
|
|
8th September 2008
|
#8 (permalink)
|
Join Date: Nov 2001
Location: Derbyshire
Posts: 5,966
|
Bind, why would you if you don't have to? Ewww...
AFAIK TinyDNS AKA DJBDNS will do it.
__________________
Web Host - VIP Member
|
|
|
9th September 2008
|
#9 (permalink)
|
Join Date: Apr 2004
Location: Newark, UK
Posts: 796
|
Quote:
Originally Posted by Karl
AFAIK TinyDNS AKA DJBDNS will do it.
|
Shoot me in the head please
ChrisB.
__________________
Chris Burton
8086 Limited (Company No.: 06336617 VAT No.: 920 5102 75)
Ever wanted to know who uses a DNS or MX server ? with DNS History you can find out.
__________________
Web Host - Certified Member
|
|
|
9th September 2008
|
#10 (permalink)
|
Join Date: Nov 2001
Location: Derbyshire
Posts: 5,966
|
Ahhh, so you'd rather use a bloated, buggy piece of software then?  The only reason we use bind anywhere is because that's what the CPs in use make us use, anywhere else we don't. I think of bind as being like Group 4 security in the early days, does the job most of the time, but you know it's only a matter of time before they let another murderer through.
__________________
Web Host - VIP Member
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|