Facebook is world’s second largest website with billions of users around the globe. In one month, it servers more than 570 billion page views and 3 billion photo uploads. In one second, Facebook servers more than 1.2 Million photos and it doesn’t include the images served by the Facebook’s CDN. In addition to that more than 25 billion pieces of content (status updates, comments, etc) are shared every month on facebook. Facebook has more than 35,000 servers to serve all these activities.
With so much traffic and activities going on the Facebook, it’s important for Facebook to use very scale-able technologies so it will not get slow for anyone. And Facebook does this very efficiently. Our Artz Studio team did some research and today we are presenting you the famous technologies used by Facebook. Let’s have a look and understand this big and interesting system.
1. HipHop for PHP
As a back end language, Facebook uses PHP for running it’s operations but there is something more to it. A compiler called HipHop is being used which converts PHP code into C++ and then compiles it. This helps Facebook to get the most out of it’s servers. HipHop was developed by Facebook Engineers and it took them 18 months of hard work.
Facebook has more than 20 Billion uploaded photos and each photo has been stored in four different resolutions resulting in 80 Billion photos. Also, as said before, Facebook needs to serve more than 1.2 Million photos per second, the photo storage and retrieval system should be very efficient. Currently Facebook is using HayStack for this purpose which is a perfect photo storage and retrieval system.
Cassandra is an open source project by Apache Software Foundation. It is basically a database management system which can be run on multiple servers with no point of failure. Facebook uses this system for it’s inbox search.
4. Hadoop and Hive
Hadoop is an open source implementation of map reduce that helps to perform calculations on massive amounts of data. While, Hive originated from within Facebook, and makes it possible to use SQL queries against Hadoop, making it easier for non-programmers to use.
Facebook uses several different languages for developing it’s different components. It’s thrift which provides a cross language platform and helps Facebook provide you a complete package. Thrift is an apache open source project and originated from inside of Facebook.
We all use Facebook daily and it’s important to have a basic idea of what going under the hood. Understanding these technologies will not only help you understand Facebook but you will also be able to use them in your own projects. Let us know about your thoughts and views about these technologies in the comments section. We’ll be glad to hear your views in this regard. Keep visiting Artz Studion for more useful stuff!