I know it's to do with having a variety of load balancing servers, but why do some sites make use of differently named "www" sub domains (www2.somesite.com, www3.somesite.com etc) where as other can be perfectly massive without doing this - ie all traffic is to www.hugesite.com.
Does it indicate certain architectural decisions / have a specific purpose? Can it be avoided or is it a limitation of having the site scale a certain way?
Website operators apply this technique for load balancing. If a server with a www domain is experiencing overload, crash, or technical maintenance, you can be redirected to a different server named www2, www3, www4, etc. The redirect can take place automatically.
WWW1 or WWW2 and the like are hostnames or subdomains, used for load balancing on domains with large user loads. The number indicates that the data your web browser is accessing is being sent from a different webserver than the one serving the main WWW domain.
1. From WIKI: WWW2 and WWW3 are hostnames or subdomains, typically used to identify a series of closely related websites within a domain, such as www.example.com, www2.example.com, and www3.example.com; the series may be continued with additional numbers: WWW4, WWW5, WWW6 etc.
Regular domains are your standard URLs like splashthat.com or splashthat. events. Subdomains are a unique URL that lives on your purchased domain as an extension in front of your regular domain like support.splashthat.com or blockparty.splashthat.com.
www[n] is an easy way to add more more servers to cope with load since you can load balance very easily between the various servers - with www[n] you can just redirect the request to the appropriate server and forget about subsequent requests - because the client then deals with www1 or www2 etc... Adding more servers is simple... but it's non persistent in terms of subsequent requests
The alternative is for the load balancer to maintain a pool of backend nodes that are maintained "behind the scenes". It keeps track of which node the user has been allocated to - normally by using session cookies to identify which backend node the user has been allocated to. It just maintains a big in memory hashmap (effectively) of the session id's to backend nodes, delegating requests from a user's browser to the backend node each time... it's more complex to setup, but more powerful in the long run.
More info here: http://en.wikipedia.org/wiki/Load_balancing_%28computing%29
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With