XDA Behind the Scenes, Part 2
This is part two of a series that takes a look at how we keep XDA running. In case you missed it, check out part one, which covers XDA’s moderation system. This second part, written by our server administrator, explains how XDA’s server configuration handles all of our traffic and many page requests.
The core of XDA’s hosting infrastructure is located at the LeaseWeb data center in Virginia, USA. XDA has a rack of bare-metal servers including database servers, PHP servers, caching servers and other miscellaneous services that make XDA work. These servers are top of the line, dual hex-core processors, with a ton of RAM and very fast redundant network connectivity.
Let’s take a look at the path of a request that comes in. First, it is processed by our load balancer, which also acts as our full-page caching server. If you are logged out and your page has been recently requested, you will be served a page from cache which allows for a speedy page load. If the page is stale, or you have a custom request (when logged in), then your request is then sent to one of our many application server. These servers essentially run PHP all the time, and create the custom page you are requesting. We cache as many parts of the site as possible in memcache, which saves database requests. Finally, we run a cluster of database servers to handle persistent data. The PHP servers compile all of this information and send it back to the load balancer, which then sends it back to you.
Back in November, we moved to LeaseWeb. The engineers at LeaseWeb worked with our stringent requirements to put together a hosting solution that was an order of magnitude faster than our old setup. Since both the servers and network was faster, our pages are created faster than ever before.
XDA has three in-house programmers who are always customizing our existing site and adding interesting new features like DevDB. We develop the new code on our machines, test it in a staging environment, then push to our live infrastructure after all the bugs and kinks have been worked out.
The XDA infrastructure has really grown organically. It wasn’t too long ago that XDA was hosted on a single server and had frequent outages when a particular post would start getting a lot of views. We now handle a significantly larger amount of traffic, and are able to serve pages more quickly. Of course, we are never fully satisfied with site speed and are always working on making things faster for our users.
Again, we would like to thank LeaseWeb for sponsoring this series of articles. If you’re in need of robust cloud, dedicated server, or CDN services, please consider LeaseWeb.