Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Facebook Databases What makes Facebook do what it does? By Gavin Mais
Facebook is a social networking website that operates and owned by Facebook, Inc. Facebook was founded by Mark Zuckerberg
Types of Databases Facebook Uses: • Memcached • HipHop for PHP • Haystack • BigPipe • Cassandra • Scribe • Hadoop and Hive • Thrift • Varnish
Memcached • Memcached is a distributed memory caching system which Facebook uses as a caching layer between the web servers and MySQL servers. • Facebook runs thousands of Memcached servers with tens of terabytes of cached data at any one point in time.
HipHop for PHP • PHP which is another term for Hypertext Preprocessor, a scripting language is slow when it comes to codes that runs on a basic server. • HipHop converts PHP into C++ code which then helps for better performance. This allows Facebook to get much more out of its web servers.
Haystack • Haystack is Facebook’s high-performance photo storage/retrieval system. Haystack is an object store, Facebook serves around 1.2 million photos per second.
BigPipe • BigPipe is a dynamic web page serving system Facebook has developed. They use it to serve each web page in sections for the best performance.
Cassandra • Cassandra is a distributed storage system with no single point of failure. Facebook uses it for its inbox search, it is one of the younger ones for the NoSQL movement.
Scribe • Scribe is a flexible logging system that Facebook uses for a large amount of purposes internally. It is made for handling logging at a large scale for Facebook.
Hadoop and Hive • Hadoop is an open source map- reduce execution that makes it possible to do calculations on a massive amount of data. Facebook uses this for data analysis. • Hive came from within Facebook which makes it possible to use SQL queries against Hadoop.
Thrift • Thrift is an internally developed cross-language framework that ties all different languages together making them able to talk to each other. For example PHP, Erlang, Java and C++.
Varnish • Varnish is an HTTP accelerator which acts as a load balancer and also a cache content which can then be served fast. Facebook uses it to serve photos and profile pictures, handling billions of requests everyday.
Work Cited • Pingdom(2010). Exploring the software behind Facebook, the world’s largest site . Retrieved May 9, 2012. from http://royal.pingdom.com/2010/06/18/the-software-behind-facebook/ • Wills, D., & Reeves, S. (2009). Facebook as a political weapon: Information in social networks. British Politics, 4(2), 265-281. doi:10.1057/bp.2009.3 • “Data Center Databases” http://www.youtube.com/watch?v=-DRxqHrPrFw