Facebook database

Facebook had a period in its history when nobody accessed it, and after that, it started to grow slowly, and today it is one of the largest sites in the world, and even beyond Google.

It started with just one dedicated server, and the costs started to cause a lot of losses, today they only have 60,000 servers spread across the world between several data centers.

Written in PHP and initially using the MySQL database, currently for analyzing access data, Facebook uses Presto (

What is Presto?

A distributed database capable of analyzing queries through banks of all sizes, from gigabytes to petabytes.

Presto was designed and written to accompany interactive analysis reports and compares with commercial "Data Warehouses" databases.

What is a Data Warehouse?

Data Warehouse, is a specific database that maintains a large amount of information, generally access log, accounting of small information, and that make the information acquired with these small details, important to know where a particular item has been more focused than other items.

In the case of Facebook, it is good to analyze which country accesses the site the most, or which type of male user from São Paulo prefers to enjoy it instead of sharing, among other aspects of analysis, in order to know the user's intention.

Facebook recently removed the "View this page as ..." option where you could choose your friend to see how your page looks to them. Certainly with the analysis, it was seen that almost nobody accessed this resource, and for this reason it was disabled.
Who uses Presto on Facebook?
In fact, only employees use it to take reports for various purposes daily, almost 30 thousand queries with a total of almost 1 petabyte of data read in banks daily.

More information you can see at:

A Facebook video showing that Presto is 10 to 100 times faster than other database solutions:

No comments