Wednesday, 30 November 2011

Software To Create a Facebook Site

facebook logo Software Used To Create Facebook
 
The big challenge for engineers is to keep the site up alive and running smoothly despite handling nearly half a billion active users. This article looks at some of the software and the techniques they use to achieve this.
The scale of the challenge FacebookBefore we get into this in more detail, here are some facts as an illustration of the scale of the challenges that must be taken care Facebook:
* Free to serve 570 billion page views per month (according to Google Ad Planner).* Photo on Facebook more than all other photo sites.* More than 3 billion photos are uploaded each month.* Free serving 1.2 million pictures per second. This does not include images served by the CDN Facebook.* More than 25 billion content (status updates, comments, etc.) are shared each month.* Facebook has more than 30,000 servers (this number is the data from last year!)


Software Behind FacebookIn some ways Facebook is still a LAMP-based sites (like), but modified and expanded its operations by incorporating many elements and other services, and modified its approach to be like that exist today.
 
For example:
* Facebook is still using PHP, but have made compilernya so it can be converted to native code on its web servers, thus improving performance.* Free use Linux, but has been optimized for its own purposes (especially in terms of tissue).* Free use MySQL, but mainly as a key-value persistent storage, moving joins and logic to the web server because the optimization is easier to do there (in the 'other side' of memcached).
Then there are custom-written systems, such as Haystack, a highly scalable object store is used to serve the photos on Facebook a lot, or Scribe, logging system that can operate on a scale up.
Now let us discuss (some of) the software (software) that are used up in providing the largest social networking site in the world.
Memcached4712028564 d0fca6a74f o Software Used To Create FacebookMemcached is now one of the most popular software on the internet. It is a distributed memory caching system that is used up (and many other sites) as a caching layer between the web server and MySQL server (because of relatively slow database access). Over the years, Facebook has repeatedly perform optimization on the memcached and the surrounding software (such as optimizing the network buildup).
Facebook running memcached server with tens of thousands of terabytes of data cache at one point in time. This possibility is the world's largest Memcached installation.
HipHop for PHP4712028602 a3b5e22cfd o Software Used To Create FacebookPHP, a scripting language, is relatively slow when compared with the code that runs natively on the server. Hiphop convert PHP into C + + code that can then be compiled to produce better performance. This has allowed up to optimize its web server because it relies heavily on PHP for serving content.
A small team of engineers (initially three people) at Facebook spent 18 months developing hip-hop, and now has in production.
HaystackHaystack is a storage system / high-performance search photos on Facebook (Truly Haystack is a storage object, so it does not save the image). He was doing heavy work, there are more than 20 billion photos uploaded in Facebook, and each is stored in four different resolutions, resulting in more than 80 billion photos.
And it is not just about the ability to handle billions of photographs, performance is also very important. As previously mentioned, Facebook serves approximately 1.2 million pictures per second, the numbers do not include pictures / photos are served by the CDN Facebook.
BigPipeBigPipe is a dynamic web page service system developed by Facebook. Facebook used to serve every web page in multiple sections (called 'pagelets') to produce optimal performance.
For example, the chat window is taken separately, the news feed is taken separately, and so on. Pagelets this can be taken in parallel, so kenerja stay awake, and also allows the user to access the site properly though some parts of disabled or damaged.
Cassandra4712028478 88e71e7d79 o Software Used To Create FacebookCassandra is an open source system that functions as a distributed database management. Facebook then develop it and use it to feature NoSQL Inbox Search. In addition to facebook, a number of other services also use, for example Digg.
ScribeScribe is a flexible logging system is used internally by Facebook for many purposes. It was developed to handle logging in Facebook, and automatically handles the emerging new logging category.
Hadoop and Hive4712028518 ed2144f29c o Software Used To Create FacebookHadoop is an implementation-Reduced-open source map that allows for the calculation of large amounts of data. Facebook use it for data analysis (and as we know, Facebook has large amounts of data). Hive developed by Facebook, and with it possible to use SQL queries against Hadoop, making it easier for non-programmers to use it.
Both Hadoop and Hive is open source and is used by a large number of services, such as Yahoo and Twitter.
ThriftFacebook uses several different languages ​​for some services. PHP is used for front-end, Erlang is used for Chat, Java and C + + are also used in some places (and perhaps other languages ​​as well). Thrift is a cross-language framework that was developed internally to tie all these different languages, thus enabling communication between languages. This allows up to cross-language development.
Varnish4711388777 09a9b1d9c8 o Software Used To Create FacebookVarnish is an HTTP accelerator that acts as a load balancer and cache content that can then be served as fast as lightning. Facebook use Varnish to serve photo and profile drawings, handling billions of requests every day. As with almost all used up, Varnish is open source.
Other things that help Facebook runs smoothlyWe have already mentioned some software that builds the system up and assist services correctly. But the handling of that system is a complex task. Here are the things that made up to keep services running smoothly.
Gradual releases and dark launchesFacebook has a system they called Gatekeeper that allows them to run different code for different set of users. This allows up to make a gradual release of new features fitus, A / B testing, to enable certain features only to employees of Facebook, etc..
Gatekeepers also enables Facebook to do something called 'dark launches', ie to enable the elements of certain features on behind the scenes before the show (without the user's knowledge). This serves as a real test and help expose bottlenecks and other problems before the feature is officially launched. Dark launches are usually done two weeks before the official launch.
Profiling of the live systemUp to monitor the system carefully and monitor the performance of any PHP function in the live production environment. PHP profiling was conducted using an open source tool called XHProf.
Gradual disabling feature for added performanceIf Facebook is experiencing performance problems, there are a number of levers that gradually disable the feature is less important for improving the performance of the main features of Facebook.
-------------
If we look, turns up a lot of make use of open source to build the system. Not only the use, Facebook has also contributed to open source software like Linux, memcached, MySQL, Hadoop, and others. More than that, Facebook also makes software that is developed internally by them as open source. Examples of open source projects that come from Facebook is hip-hop, Cassandra, Thrift and Scribe. List of open source software where up getting involved in its development can be viewed on page Facebook's Open Source.

No comments:

Post a Comment

Silahkan anda berkomentar, namun tetap jaga kesopanan dengan tidak melakukan komentar spam.