Facebook website Architecture Software Secrets

Source: Internet
Author: User
Tags cassandra memcached

the years 6 months, Google published Worldwide Top 1000 website. Facebook is the champion.

With Facebook's current size, many traditional server technologies will collapse or simply fail to support them. So how will Facebook's engineers make the site run smoothly in the face of 500 million of active users? Bole Online – This article in the Workplace blog will showcase the software that Facebook's engineers have used to accomplish this daunting task.

Facebook level-scale challenges

Before we dive into the details, you can imagine how a group of Facebook has to face the data.

· Facebook PV per month: 630,000,000,000 (630 billion)

· The number of pictures on Facebook is larger than the sum of other image sites (including image sites such as Flickr)

· More than 3 billion images are uploaded to Facebook every month.

· The Facebook system can handle 1.2 million pictures per second. This does not include pictures of Facebook's CDN processing.

· Handle more than 25 billion information per month (including user status updates, comments, etc.)

· Facebook has more than 30,000 servers (this data is 2009 years of data)

Facebook The software used

Facebook is a lamp-type site in some ways, but Facebook has made the necessary changes, extensions, and modifications to its existing methods in order to accommodate a large number of other components and services.

Like what:

· Facebook is still using PHP, but Facebook has rebuilt its new compilers to meet the ability to load local code on its Web server to improve performance;

· Facebook uses Linux, but has done the necessary optimizations for its own purposes. (especially in terms of network throughput);

· Facebook uses MySQL, but it also optimizes it.

There are also custom systems, such as haystack-highly scalable object storage to handle Facebook's huge images; Scribe-facebook's log system.

Here's what the software used by Facebook, the world's largest social networking site, is showing.


Memcached

Memcached is a very famous software. It is a distributed memory caching system. Facebook (and a large number of sites) uses it as a caching layer between the Web server and the MySQL server. Over the years, Facebook has done a lot of optimization work on memcached and its related software, such as the web stack.

Facebook runs thousands of memcached servers to handle terabytes of cached data in a timely fashion. It can be said that Facebook has the world's largest memcached equipment.

HipHop for PHP

PHP runs relatively slowly compared to the code running on the local server. Hiphop translates PHP code into C + + code to improve performance at compile time. Because Facebook relies on PHP to process information, there is a hiphop,facebook on the Web server.

The birth process of hiphop: at Facebook, a small group of Engineers (initially 3) were developed for 18 months.

Haystack

Haystack is a high-performance image storage/retrieval system for Facebook. (Strictly speaking, Haystack is an object store, so it doesn't necessarily have to store pictures.) Haystack the workload is very large. With more than 20 billion images on Facebook, each image is saved at four different resolutions, so Facebook has more than 80 billion images.

Haystack's role is not only to deal with a large number of pictures, its performance is the highlight. As we mentioned earlier, Facebook handles about 1.2 million images per second, which does not include the number of images that its CDN processes. This is an amazing data ...

Bigpipe

Bigpipe is a dynamic web-processing system developed by Facebook. For optimal use, Facebook uses it to process chunks of each page (also known as "Pagelets").

For example, the Chat window is independent search, the news source is also independent search. These pagelets can be retrieved concurrently, and performance is improved. So, even if a part of the site is deactivated or crashed, users can still use it.

Cassandra

Cassandra is a distributed storage system without a single point of failure. It is a member of the former NoSQL movement and is now open source (has joined the Apache project). Facebook uses it to do email search.

In addition to Facebook, Cassandra also applies to many other services, such as

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.