Greetings gentle network admins and web programmers. GeoScaling DNS2 is a managed DNS server which you can control from a web browser.
Let me give you a simple example of what kind of redirection you can achieve with DNS2.
/* as30890 - evolva ilink as8708 - RDS as34304 - teen telecom as24745 - Romtelecom */ if($country=="ro") { if( sizeof( array_intersect ( $as, array("as30890", "as24745") ) ) ) { $output[] = array("A", "86.55.16.126"); // fisierulmeu.ro - evolva ilink } else if( sizeof( array_intersect ( $as, array("as34304", "as8708") ) ) ) { $output[] = array("A", "193.138.195.114"); // teen telecom } else // another network, just send both ips { $output[] = array("A", "86.55.16.126"); // fisierulmeu.ro $output[] = array("A", "193.138.195.114"); // teen telecom } } else { $output[] = array("A", "91.121.158.100", "400"); // ovh international, ttl set to 400 }
The above code redirects the user only based on country and AS numbers. If a user comes from Romania and is in certain networks, he/she gets one set of IP addresses, otherwise another. If the user is an international visitor, he/she gets the address of the international mirror in France. This effectively lets you build a Content Delivery Network in a few lines of code, where each user can be redirected to the best/closest mirror. The above code actually runs on a limited version of PHP.
The advanced features of DNS2 are geared towards medium and large websites.