How does Facebook achieve good performance?

There's no single reason, but a whole lot of reasons:

		Heavy usage of [memcached](, which drastically cuts processing time. Slide 12 compares load time with APC (~130 ms) versus without it - 4050 ms. That's 30x faster!

		Usage of [HipHop](, which converts PHP into C++ code (which is then compiled into much more efficient machine code than actual PHP).

		Facebook uses PHP and MySQL, but that's not the only thing they use. For example, they use [careers page](, you'll see they are hiring developers with experience in C++, Java, Python, and others.

		Facebook has data distributed across many, many servers. In June 2010, FB had [60,000 servers]( (think that's too much? Google had half a million... 5 years ago)

		Facebook sends [as little traffic as possible]( they use static CDNs to deliver static content. Gzip to compress data. Cookies, Javascript, HTML - everything is cut back to reduce the number of bytes sent over the network. They use a technology they call "BigPipe", which sends partial content rather than the whole page.