Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook wall's database structure

I need to create a wall system just like Facebook's (users can post messages, videos, images, events, etc...). Has anyone created something similar? How do you recommend me to prepare the database?

like image 771
Efe Avatar asked Aug 20 '09 22:08

Efe


People also ask

What is the structure of Facebook database?

MySQL is the primary database used by Facebook for storing all the social data. They started with the InnoDB MySQL database engine and then wrote MyRocksDB, which was eventually used as the MySQL Database engine. Memcache sits in front of MySQL as a cache.

Does Facebook use Rdbms?

Facebook uses a relational database to keep the primary data. Facebook uses fork of MySql 5.6 to keep the social graph and facebook messenger data (more than 1B users).

How is Facebook database so fast?

According to Gigaom, Facebook uses Autoscale as an intermediary between incoming traffic and the company's servers. During periods of low network traffic, Autoscale distributes this traffic to a smaller number of servers and keeps these servers running at medium capacity.


1 Answers

Updated post

Facebook has given presentations talking about their use of data. Everyone assumes they are pioneers in the management of Big Data which is a buzzword these days. But in fact, their presentation was titled Lots and Lots of Small Data. That is, they basically write lots of queries for reading or writing individual records. This is an oversimplification, but it's like their SQL database is an enormous key/value store. One aspect of this architecture is that it makes it straightforward for them to exchange SQL data with copies in memcached.

Facebook uses MySQL extensively, and contributes patches back to the MySQL project. They have a public Launchpad site called mysqlatfacebook and also a Facebook site called MySQLatFacebook.

For distributed data, they use a non-relational technology called Map/Reduce, included in the Hadoop project. They built a project called Hive to query the data with an SQL-like language. They also use other specialized data management technology for specific systems.

Because they are always innovating and having to scale up larger and larger, they regularly invent or adopt other technology for data management.

Check out:

  • Data Management, Facebook-style
  • Hive - A Petabyte Scale Data Warehouse using Hadoop
  • Presto: Interacting with petabytes of data at Facebook
like image 120
Bill Karwin Avatar answered Sep 19 '22 08:09

Bill Karwin