25

I'm aware of "round robin DNS" load balancing, but how can a single IP address be load balanced?

Google's DNS servers for example, 8.8.8.8 and 8.8.4.4. Wikipedia's load balancing article states:

For Internet services, the load balancer is usually a software program that is listening on the port where external clients connect to access services. The load balancer forwards requests to one of the "backend" servers, which usually replies to the load balancer.

..which seems reasonable when used with round robin DNS, however for the likes of Google's DNS servers this doesn't seem like a very redundant or capable setup.

Torvero
  • 414
  • 7
  • 14

2 Answers2

33

http://en.wikipedia.org/wiki/Anycast

Anycast is a network addressing and routing methodology in which datagrams from a single sender are routed to the topologically nearest node in a group of potential receivers, though it may be sent to several nodes, all identified by the same destination address.

...

Nearly all Internet root nameservers are implemented as clusters of hosts using anycast addressing. 12 of the 13 root servers A-M exist in multiple locations, with 11 on multiple continents. (Root server H exists in two U.S. locations. Root server B exists in a single, unspecified location.) The 12 servers with multiple locations use anycast address announcements to provide a decentralized service. This has accelerated the deployment of physical (rather than logical) root servers outside the United States. RFC 3258 documents the use of anycast addressing to provide authoritative DNS services. Many commercial DNS providers have switched to an IP anycast environment to increase query performance, redundancy, and to implement load balancing.

ceejayoz
  • 32,469
  • 7
  • 81
  • 105
  • 5
    Anycast is a complicated topic, but DNS operates (mostly) over UDP which makes anycasting it relatively simple. To anycast a TCP service requires a very specialized network setup, or clients that can tolerate their connection dropping any time routes change. – hobbs Dec 24 '14 at 06:31
  • question specifically mentions single ip addresses, which makes this answer irrelevant to the question. – Tuncay Göncüoğlu Dec 24 '14 at 16:19
  • @TuncayGöncüoğlu: please see my comment on your similar statement below. – MadHatter Dec 24 '14 at 16:21
  • 3
    @TuncayGöncüoğlu The question mentions 8.8.8.8, which is a single IP address that'll route to one of Google's many datacenters using anycast. Your not being aware of anycast doesn't mean it doesn't exist, and I've linked source material if you're interested in learning about it. – ceejayoz Dec 24 '14 at 16:36
1

Load balancing of a service on a single (or multiple) ip has nothing to do with DNS resolution. It works with a router (or server acting as a router), listening to a port on an external interface, which is propagated as the single server, www.someplace.com for example, then reroute that traffic to internal servers, balancing them according to rules defined in its own setup. So, the client always connects to the load-balancing-router, and traffic only spreads to internal servers after that, as opposed to round-robin-dns balancing, where clients connect directly to one of the servers referred to it by DNS.

  • 1
    From my answer, "RFC 3258 documents the use of anycast addressing to provide authoritative DNS services". `www.google.com` is most certainly **not** a "single server". – ceejayoz Dec 24 '14 at 16:00
  • 1
    it was just an example for an address. – Tuncay Göncüoğlu Dec 24 '14 at 16:15
  • @ceejayoz I also feel your answer is not really related to the question. Question was about a single IP address, not a redirection to closest node, which will have a different ip. – Tuncay Göncüoğlu Dec 24 '14 at 16:18
  • 3
    @TuncayGöncüoğlu : that last statement is false. Google's DNS, probably the most famously anycast service on the internet, does indeed operate in multiple sites around the world, on a single IP address. You are right that single-site solutions exist that offer multiple servers behind a single IP address without anycast, and you describe that well above, but since the OP asked specifically about `8.8.8.8`, I find ceejayoz's answer hard to fault. – MadHatter Dec 24 '14 at 16:20