Facebook Engineering

It’s funny how few people realize the tremendous technical underpinnings of a site like Facebook, that on its face, may seem to be pretty simple.

But don’t get it twisted, Facebook has some of the brightest engineers on the planet working on some pretty impressive underlying architecture to ensure that the hundreds of millions of Facebook users who use the site can do so without a hitch.

Recently, Facebook invited Ryan Paul of Ars Technica to take a look  at the process the company uses to roll out updates across the site.

The Facebook source code is largely written in the PHP programming language. PHP is conducive to rapid development, but it lacks the performance of lower-level languages and some more modern alternatives. In order to improve the scalability of its PHP-based infrastructure, Facebook developed a special transpiler called HipHop.

HipHop converts PHP into heavily optimized C++ code, which can then be compiled into an efficient native binary. When Facebook unveiled HipHop to the public in 2010 and began distributing it under an open source software license, the company’s engineers reported that it reduced average CPU consumption on Facebook by roughly 50 percent.

Because Facebook’s entire code base is compiled down to a single binary executable, the company’s deployment process is quite different from what you’d normally expect in a PHP environment. Rossi told me that the binary, which represents the entire Facebook application, is approximately 1.5GB in size. When Facebook updates its code and generates a new build, the new binary has to be pushed to all of the company’s servers.

The entire article is well worth a read and provides an unprecedented look into the technology and processes that make Facebook tick and run seamlessly. Interestingly enough, the article notes that Facebook typically rolls out a minor update every single day. As Mark Zuckerberg noted in his letter to investors recently, it’s all about the Hacker way – release, iterate, and release again.

It’s always fascinating to learn more about the culture that permeates through a successful tech company so hop on over here to Ars and take a look.

Edible Apple

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply