Monday, August 18, 2014

Facebook Engineering: What is Facebook’s architecture?

From various readings and conversations I had, my understanding of Facebook’s current architecture is:

  • Web front-end written in PHP. Facebook’s HipHop Compiler [1] then converts it to C++ and compiles it using g++, thus providing a high performance templating and Web logic execution layer. 
  • Because of the limitations of relying entirely on static compilation, Facebook’s started to work on a HipHop Interpreter [2] as well as a HipHop Virtual Machine which translate PHP code to HipHop ByteCode [3]. 
  • Business logic is exposed as services using Thrift [4]. Some of these services are implemented in PHP, C++ or Java depending on service requirements (some other languages are probably used…) 
  • Services implemented in Java don’t use any usual enterprise application server but rather use Facebook’s custom application server. At first this can look as wheel reinvented but as these services are exposed and consumed only (or mostly) using Thrift, the overhead of Tomcat, or even Jetty, was probably too high with no significant added value for their need. 
  • Persistence is done using MySQL, Memcached [5], Hadoop’s HBase [6]. Memcached is used as a cache for MySQL as well as a general purpose cache.
Read more here

Leave a Reply

All Tech News IN © 2011 & Main Blogger .