Facebook is currently the world’s most popular web
site, with more than 1 trillion page views each month, according to metrics from Google’s
DoubleClick service. Facebook currently accounts for about 9 percent of all
Internet traffic, slightly more than Google.
Facebook requires massive storage infrastructure to
house its enormous stockpile of photos, which grows steadily as users
add 300 million new photos every day. In addition, the company’s
infrastructure must support platform services for more than 1 million web sites
and 550,000 applications using the Facebook Connect platform.
The company’s massive armada of servers and storage must
work together seamlessly to deliver each Facebook page. “Loading a user’s home
page typically requires accessing hundreds of servers, processing tens of
thousands of individual pieces of data, and delivering the information selected
in less than one second. Here is a brief description of what servers and what programming languages and database softwares are used in Facebook.
What kind of servers does
Facebook use?
In a marked departure from industry practice, Facebook
has disclosed the designs and specs for its data centers. In April 2011 the
social network launched the Open Compute Project, through which it is releasing
the details of its energy efficient data center design, as well as its custom
designs for servers, power supplies and UPS units.
Facebook’s servers are powered by chips from both Intel
and AMD, with custom-designed motherboards and chassis built by Quanta Computer
of Taiwan. The servers use a 1.5U (2.65 inch) chassis, allowing the use of
larger heat sinks and fans to improve cooling efficiency.
The cabling and power supplies are located on the front
of the servers, so Facebook staff can work on the equipment from the cold
aisle, rather than the enclosed, 100-degree plus hot aisle.
Facebook’s servers include custom power supplies that
allow servers to use 277-volt AC power instead of the traditional 208 volts.
This allows power to enter the building at 400/277 volts and come directly to
the server, bypassing the step-downs seen in most data centers as the power
passes through UPS systems and power distribution units (PDUs). The custom
power supplies were designed by Facebook and built by Delta Electronics of
Taiwan and California-based Power One.
Facebook contemplated installing on-board batteries on
its servers, but settled on in-row UPS units. Each UPS system houses 20
batteries, with five strings of 48 volt DC batteries. Facebook’s power supplies
include two connections, one for AC utility power and another for the DC-based
UPS system. The company has systems in place to manage surge suppression and
deal with harmonics (current irregularities).
What kind of software does
Facebook Use?
Facebook was developed from the ground up using open source software. The
site is written primarily in the PHP programming language and uses a MySQL
database infrastructure. To accelerate the site, the Facebook Engineering team
developed a program called HipHop to
transform PHP source code into C++ and gain performance benefits.
Facebook has one of the largest MySQL database clusters
anywhere, and is the world’s largest users of memcached, an
open source caching system. Memcached was an important enough part of
Facebook’s infrastructure that CEO Mark Zuckerberg gave a tech talk on
its usage in 2009.
Facebook has built a framework that uses RPC (remote
procedure calls) to tie together infrastructure services written in any
language, running on any platform. Services used in Facebook’s infrastructure
include Apache Hadoop, Apache Cassandra, Apache Hive, FlashCache, Scribe,
Tornado, Cfengine and Varnish.
No comments:
Post a Comment