| 1 | <!doctype linuxdoc system> |
|---|
| 2 | |
|---|
| 3 | <article> |
|---|
| 4 | |
|---|
| 5 | <!-- Title information --> |
|---|
| 6 | <title>The case for PowerDNS</title> |
|---|
| 7 | <author>PowerDNS BV (bert hubert <bert@trilab.com>) &nl; |
|---|
| 8 | Trilab BV</author> |
|---|
| 9 | <date>v1.0 $Date: 2002/11/27 15:18:34 $</date> |
|---|
| 10 | <abstract> |
|---|
| 11 | This document describes what Global Server Load Balancing is, and how |
|---|
| 12 | PowerDNS can be employed in a GSLB configuration |
|---|
| 13 | </abstract> |
|---|
| 14 | <toc> |
|---|
| 15 | <sect>GSLB |
|---|
| 16 | <p> |
|---|
| 17 | GSLB, short for Global Server Load Balancing, isr the act of distributing |
|---|
| 18 | server traffic to different locations. Although not necessary, this is |
|---|
| 19 | almost always done using a smart nameserver. |
|---|
| 20 | <sect1>Typical GSLB implementation |
|---|
| 21 | <p> |
|---|
| 22 | A user enters the name of a site ('www.thesite.com') in his or her browser. |
|---|
| 23 | This causes the operating system, often Windows, to send out a request to |
|---|
| 24 | the ISP of the user, asking for the IP address of www.thesite.com. If the |
|---|
| 25 | nameserver of the ISP doesn't know this address, it asks the nameserver of |
|---|
| 26 | thesite.com. |
|---|
| 27 | <p> |
|---|
| 28 | This nameserver then contains the GSLB smartness. Based on the IP Address of |
|---|
| 29 | the nameserver of the ISP, it determines which of the 'www.thesite.com' |
|---|
| 30 | servers is closest. |
|---|
| 31 | |
|---|
| 32 | A multitude of algoritms is in use for determining which server is closest. |
|---|
| 33 | Some of them employ the Border Gateway Protocol, BGP, which is used for |
|---|
| 34 | global internet routing. Some use 'ICMP Ping' measurements, some use |
|---|
| 35 | modified DNS Queries. The simplest algorithm is to use IP Netmasks, which |
|---|
| 36 | are an easy rule of thumb for determining who assigned an IP Address, which |
|---|
| 37 | also gives it probable location. |
|---|
| 38 | |
|---|
| 39 | <sect>IP Netmasks and Location |
|---|
| 40 | <p> |
|---|
| 41 | IP Addresses are asigned by only a few entities worldwide, the foremost |
|---|
| 42 | being ARIN, RIPE and APNIC, who respectively manage North- and South |
|---|
| 43 | America, Europe and surrounding areas, and the Asian Pacific Region. |
|---|
| 44 | |
|---|
| 45 | This allows for coarse grained identification of location. While not very |
|---|
| 46 | precise, it is very robust and guaranteed to work. It can be likened to a |
|---|
| 47 | very good rule-of-thumb. Other methods employ complicated and fragile |
|---|
| 48 | techniques for determining the 'internet distance' to a site. |
|---|
| 49 | |
|---|
| 50 | For example, ICMP Ping measurements are becoming less and less valid. The |
|---|
| 51 | advent of Distributed Denial of Service attacks has lead many internet |
|---|
| 52 | providers to block or limit these packets. The aforementioned BGP router |
|---|
| 53 | protocol gives distance in 'AS Hops' which are no longer a valid measure of |
|---|
| 54 | distance, as many Autonomous Subsystems now spread the globe. |
|---|
| 55 | |
|---|
| 56 | <sect1>IP Netmasks Configuration |
|---|
| 57 | <p> |
|---|
| 58 | PowerDNS comes preconfigured with a reasonable set of IP Rules. These may |
|---|
| 59 | need some maintainance over time. It is adviseable to get a Subscription with |
|---|
| 60 | PowerDNS so as to receive updates. |
|---|
| 61 | |
|---|
| 62 | These rules come in several levels. The lowest level is based on who |
|---|
| 63 | assigned the IP Addresses, ARIN, RIPE or APNIC. The second level contains |
|---|
| 64 | exceptions to these major rules. Change is expected especially in this |
|---|
| 65 | second level. |
|---|
| 66 | |
|---|
| 67 | <sect>GSLB Concepts |
|---|
| 68 | <p> |
|---|
| 69 | A number of concepts are used in the PowerDNS GSLB configuration: |
|---|
| 70 | |
|---|
| 71 | <descrip> |
|---|
| 72 | <tag>Netblock</tag> |
|---|
| 73 | A netblock is a range of IP Addresses. A number of Netblocks together are |
|---|
| 74 | grouped in a Region. |
|---|
| 75 | <tag>Region</tag> |
|---|
| 76 | A Region might be called 'ARIN' or 'Surfnet', and consists of a limited |
|---|
| 77 | number of Netmasks. |
|---|
| 78 | <tag>Target</tag> |
|---|
| 79 | A Target describes a set of servers in a single location. Target names might |
|---|
| 80 | be 'UUnet Amsterdam', 'Level3 Amsterdam' or 'Genuity'. |
|---|
| 81 | <tag>Route</tag> |
|---|
| 82 | A Route assigns a certain Region to a Target. A sample Route might be: |
|---|
| 83 | Assign all ARIN IP Addresses to Genuity. |
|---|
| 84 | <tag>Schema</tag> |
|---|
| 85 | A set of Routes, Regions, Netblocks and Targets is called a Schema. Many |
|---|
| 86 | different domains may be assigned to this Schema, which then only needs to |
|---|
| 87 | be defined once. |
|---|
| 88 | </descrip> |
|---|
| 89 | |
|---|
| 90 | <sect>DNS Configuration |
|---|
| 91 | <p> |
|---|
| 92 | In order to Load Balance a domain it must be pointed at the GSLB Schema. |
|---|
| 93 | This is typically done using a DNS CNAME on the nameserver of the domain |
|---|
| 94 | that needs to be balanced. |
|---|
| 95 | |
|---|
| 96 | In order for this to work, the Schema name must resolve to the IP Address of |
|---|
| 97 | PowerDNS. |
|---|
| 98 | </article> |
|---|
| 99 | |
|---|