Out of curiosity, I wanted to know, how Wordpress.com scale their architecture, specifically:
how they handle sub-domains.
I believe they have millions of subdomains.CMIIW. How do they scale their DNS to handle it?
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 wordpress.com tag.
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;That's a bit of a mouth-full, but here's a basic breakdown;
test.wordpress.com, or any subdomain of wordpress.com, is a CNAME to lb.wordpress.com (I assume 'lb' is 'load balancer'). lb.wordpress.com contains some A records that point to their servers. On the server side, they most likely have the configuration set so *.wordpress.com CNAME's to lb.wordpress.com, then when they need to add/remove/modify servers they can change the settings for lb.wordpress.com.
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.
I suggest you to search on http://highscalability.com/blog/ and follow it.
They have few articles on wordpress scalability.
@SAM you can never know how wordpress.com is scaled by doing dig or dns brute forcing.