-1
When i ping 8.8.8.8 from my home computer (europe) i get around 26 ms latency.
When i ping 8.8.8.8 from a server(US) i get around 1 ms latency.
When i ping my (US) server from home (europe) i have 130 ms latency.

I know that i can setup a custom DNS/nameservers and attach it to my domain so it can be used to geographically resolve domain names / route traffic to the closest server/loadbalancer.

However, as my experiment above showed apparently something similar is possible with ip's?

Can someone explain to me how this works / how i can replicate it?

lolwin
  • 1
  • 3

1 Answers1

1

This is possible using Anycast-BGP. A quite good explanation can be found here: https://www.maxcdn.com/blog/anycast-ip-routing-used-maxcdn/

Thomas Stinner
  • 257
  • 1
  • 4
  • Thank you. VPS providers like: http://prgmr.com/transit.html allow BGP servers. Lets say i found a similar provider in europe + i had a AS number + i bought some ipv4 block. What software would you recommend that would do Anycast-BGP? (i would prefer it to be written in efficient C) Sorry for my noob questions im completely new to this space bu learning as fast as possible :) – lolwin Oct 24 '14 at 11:01
  • Found a great tutorial for http://www.nongnu.org/quagga/ http://netlinxinc.com/netlinx-blog/45-dns/125-anycast-dns-part-5-using-bgp.html – lolwin Oct 24 '14 at 12:04
  • 1
    Bear in mind that you need to peer BGP with your internet hosting/service provider so that you can announce the anycast address(es) to them and they in turn will advertise them on to their peers (and so on). Most service providers will refuse to accept anything less than a /24, so you'll probably need a to get one even if you only want to use one address out of it - and good luck getting **any** provider independent addresses these days (IPv4 shortage). You might be better off looking at something like CloudFlare. – Dermot Williams Oct 24 '14 at 13:56
  • You can do this a number of ways, but I would recommend collaborating with a seasoned network engineer. BGP is easy to get wrong and can do significant damage to large parts of the Internet. You could easily wind-up transiting significant parts of the internet through your servers and incur huge bills from the ISP or break major sites, if all your ISPs are not doing AS-path filtering exactly right. – DTK Oct 25 '14 at 15:43
  • I wouldn't worry about efficient C right now. You need to worry about doing this sanely. There are great appliances for doing IP Anycast. For general services, you might look at F5 LTM with ZebOS. If you are doing IP Anycast for DNS, Infoblox's NIOS appliances are really good for DNS and provide IP Anycast. You could also do this easily with Cisco's IOS or NS-OS routers. But in any of these situations, you need an experienced network engineer, and you need to work with your ISPs to do this. – DTK Oct 25 '14 at 15:46