==== GeoScaling DNS2 ==== Greetings gentle network admins and web programmers. GeoScaling DNS2 is a managed [[wp>DNS_Server|DNS server]] which you can control from a web browser. === Basic Features === * Redundancy and scalability assured by nameservers in [[Geographical locations of GeoScaling DNS2 servers|three countries and two continents]]. * Easy to use web interface * Add and edit DNS records without reloading the page * Changes propagate instantly to our nameservers * Low time-to-live (TTL) ensures updated records are propagated on the Internet in less than 5 minutes * Support for most types of records, including SRV === Advanced Features === * [[Dynamic DNS API|Dynamic DNS support]] * [[Importing records from BIND files|Upload, paste and import BIND zone files]] * Import records by doing a zone transfer (AXFR) * **Redirect visitors** dynamically based on * Their **country** of origin * Their **network name** (Autonomous System Number / AS / ASN) * The **uptime** of your servers * Custom information such as **server loads** sent to GeoScaling via our simple API * **[[Smart Subdomains|Any combination of the above]]** * Make live redirection decisions for each visitor with our [[Smart Subdomains|smart subdomains]] powered by a subset of the PHP scripting language 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.