1

On several large-scale websites, I've seen being redirected from http://www.example.com/ to http://www2.example.com/

One of such examples is Netflix.

My hypothesis is that this is used to:

  1. Either distribute the load across data centers before even reaching the load balancers (clients from some IPs are redirected to www2. during a session, while others still use www.),

  2. Or, less probably, switch users to another data center during a maintenance operation. I say "less probably" since those switches are quite frequent—I hardly doubt maintenance operations on front load balancers are done that often.

In the first case, what are the benefits of this technique?

In the second case, wouldn't a change in DNS records be enough?

Arseni Mourzenko
  • 2,275
  • 5
  • 28
  • 41

3 Answers3

6

It's used to load balance.

You can use DNS to point www.example.com to one IP, www2.example.com to another IP, www3.example.com to yet another IP and so on and so on. And, in fact, this is how it's used. If you look at the DNS records for the domain, you should see an entry for www pointing to one IP, www2 pointing to another IP, and so on. It's a simple way to horizontally scale a website across multiple hosts, and as you note, it can also be use to horizontally scale across multiple datacenters or load balancers as well.

As to why, primarily because it's extremely simple, much cheaper than transparent load balancing and very easy to scale. By comparison, dedicated load balancing appliances are very complicated, expensive and difficult to configure, support and scale out.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
  • On top, you can do an intelligent redirect here - redirecting to a server close if they are in different locations. This is not really doable with anything transparent short of owning the ip address range and manipulating the routing. – TomTom Feb 13 '15 at 14:47
  • @TomTom what about having the DNS server return a different IP for the A record depending on the location of the user ? –  Feb 13 '15 at 16:44
  • 1
    @AndréDaniel that may break with caching AND it requires a lot more infrastructure than most DNS providers are providing. – TomTom Feb 14 '15 at 11:02
0

In the website world some people use ww2 to load balance and/or do A/B testing with "real user load" on a second cluster . Sometime its just a trick used to load with real user and do some benchmark on new stuff :)

YuKYuK
  • 627
  • 3
  • 14
0

WWW2 or WWW3 may also refer to:

  1. Subdomain - part of a domain name identifying a website.
  2. World Wide Web - a system of interlinked, hypertext documents that runs over the Internet.

typically used to identify a series of closely related websites within a domain, such as www.example.org, www2.example.org, and www3.example.org; the series may be continued with additional numbers: WWW4, WWW5, WWW6 etc. Traditionally, such websites are mirrors used for server load balancing. In some cases, the specific hostname may be obscured, creating the appearance that the user is viewing the "www" subdomain, even if they are actually viewing a mirror site.