Facebook faster due to HipHop

February 8, 2010

Facebook has recently undergone a transformation that may not be apparent at first but will speed up the overall use of the popular social media website.
This technology is called HipHop for PHP. Using this has allowed Facebook developers to reduce the CPU usage on their Web servers on average by about fifty percent. How is this done you ask?
HipHop helps the PHP programmers to overcome some shortfalls of scripted languages like PHP, such as less efficient CPU and memory usage. They do this by transforming the PHP code into C++ code with HipHop and then compiling it with g++ (an open source compiler for c++ code that can be found here... http://gcc.gnu.org ).
To help, certain parts of your code can be written in c++ to begin with but the magic of this system is obviously for sites like Facebook that employ PHP experts and need to find an interoperability between languages. This way, the same developers can work on both sets of code without having to be experts in both.
Facebook has also released this system as open source software so that other sites facing similar problems may use their system to speed up their sites as well.
Facebook has reported that they are using HipHop on 90% of all their traffic so it is a great testing ground for such software.  As such, from Facebook come the following statistics:

  • More than 400 million active users
  • 50% of our active users log on to Facebook in any given day
  • More than 35 million users update their status each day
  • More than 60 million status updates posted each day
  • More than 3 billion photos uploaded to the site each month
  • More than 5 billion pieces of content (web links, news stories, blog posts, notes, photo albums, etc.) shared each week
  • More than 3.5 million events created each month
  • More than 3 million active Pages on Facebook
  • More than 1.5 million local businesses have active Pages on Facebook
  • More than 20 million people become fans of Pages each day
  • Pages have created more than 5.3 billion fans

Source: http://www.facebook.com/press/info.php?statistics
This adds up to a site that serves serves nearly 400 billion PHP-based page views every month.
If you would like more information on this project:
Developer Mailing List: http://groups.google.com/group/hiphop-php-dev
Posted by Jeff Johnston

Never miss a post.

Email Newsletter

* indicates required
V Strategies | Video Production

Privacy Policy
Copyright © V Strategies 2020

Calgary Office
1918 – 9 Avenue SE
Calgary, AB
T2G 0V2
1+ 403 229 2511
Get Directions

Think Visual BlogOur Blog
Contact Us Now