Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Out of curiosity, I wanted to know, how scale their architecture, specifically:

  1. how they handle sub-domains.

    I believe they have millions of subdomains.CMIIW. How do they scale their DNS to handle it?

  2. They also support custom domains.

    How do they handle the translation and also, how do they scale the requests?

note, I choose the wordpress tag, because I'm not allowed yet to create tag.

share|improve this question
It's seems automatic doesn't communicate much. Edublogs has given some tips, and you can also see the Q&A How does Wordpress scale – rds Nov 21 '11 at 10:33
I've read this:… but it basically tell how to scale on application side. I was wondering, how to do the dns side. – ariefbayu Nov 21 '11 at 10:49

This probably isn't the right place to ask this question but;

1) Subdomains

I'd imagine they just have a wildcard subdomain. If you run the dig tool you get a response like this;

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62954
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

;            IN      A

;; ANSWER SECTION:     14400   IN      CNAME       300     IN      A       300     IN      A       300     IN      A       300     IN      A       300     IN      A       300     IN      A

;; Query time: 237 msec
;; WHEN: Mon Nov 21 10:27:33 2011
;; MSG SIZE  rcvd: 149

That's a bit of a mouth-full, but here's a basic breakdown;     14400   IN      CNAME, or any subdomain of, is a CNAME to (I assume 'lb' is 'load balancer'). contains some A records that point to their servers. On the server side, they most likely have the configuration set so * CNAME's to, then when they need to add/remove/modify servers they can change the settings for

2) Custom domains.

This is really more of an application side issue, every* HTTP request sends a HTTP header containing the host. This can be accessed from the application, for example in PHP you can get this value with $_SERVER['HTTP_HOST']. Then it's simply a matter of looking up which 'user' a HTTP host belongs too and returning the content. To understand this a bit more I'd suggest you look into the way Wordpress MU, Wordpress Networks (MU was 'discontinued'/it was integrated into the core of Wordpress standard) and the 'Wordpress MU Domain Mapping' plugin work.

*Most, in fact you can pretty much depend on the Host: header being sent. Any client that doesn't send Host headers will likely run into many other issues.

share|improve this answer
Hmm... so they play with some sort of load balancing the DNS request with all those Interesting... – ariefbayu Nov 21 '11 at 10:49
@silent The IP's of all point to NGINX servers(1) which forward the requests to the app servers, at a guess I'd say behind those NGINX balancers they've got a couple of hundred app servers and a good few database/caching servers - (1) – Smudge Nov 21 '11 at 11:07

I suggest you to search on and follow it.

They have few articles on wordpress scalability.

@SAM you can never know how is scaled by doing dig or dns brute forcing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.