What is Facebook's architecture?

businessunknownInternet and Web Development

Nov 12, 2013 (3 years and 9 months ago)


What is Facebook's architecture?

Web front
end written in PHP. Facebook's HipHop isn't technically a compiler
itself. Rather it is a source code transformer. HipHop

transforms your PHP source code into highly optimized C++ and then uses
g++ to compile it.thus providing a high performance templating and Web
logic execution layer , With HipHop we've reduced the CPU usage on our Web
servers on average b
y about fifty percent, depending on the page. Less CPU
means fewer servers, which means less overhead .

Business logic is expo
sed as services using Thrift

A thrift is a software framework for scalable cross
language services
development. It combines a s
oftware stack with a code generation engine to
build services that work efficiently and seamlessly between C++, Java, Python,
PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, and

. Some of these services are implemented i
n PHP, C++ or Java depending on
service requirements (some other languages are probably used...)

Persistence is done using


Memcached :
Free & open source, high
performance, distributed memory
object caching system
, generic in nature, but inten
ded for use in speeding up
dynamic web applications by alleviating database load.

Memcached is an in
memory key
value store for small chunks of arbitrary
data (strings, objects) from results of database calls, API calls, or page

cebook's Cass
andra :

highly scalable second
generation distributed
database , the facebook reduce using it after using the HBase.

Hadoop's HBase :
Use it when you need random, realtime read/write access
to your Big Data.

Data such as logging, clicks and feeds transit
using Scribe
and are aggregating
and stored in HDFS using Scribe


Scribe is a server for aggregating log data streamed in real time from a large
number of servers. It is designed to be scalable, extensible without client
modification, and
robust to failure of the network or any specific machine


BigPipe is a fundamental redesign of the dynamic web page serving system.
The general idea is to decompose web pages into small chunks called
pagelets, and pipeline them through several
execution stages inside web
servers and browsers.