Why Facebook Uses MySQL for Timeline

 By 
Pete Pachal
 on 
Why Facebook Uses MySQL for Timeline
Mashable Image
Credit:

In this report from Wired, Serkan Piantino, who will be in charge of Facebook's New York engineering office, reveals that Facebook turned to MySQL to help address the memory needs of Timeline, since it works in a fundamentally different way from the news feed.

Since Timeline is more concerned about organizing data neatly than shooting out updates in real time, MySQL is well suited for the app. Although the data is aggregated in the same location as the data is kept (i.e. not over a network connection), that data is managed by MySQL, and not an alternative like NoSQL or Hadoop Hbase.

"A lot of people are surprised that for this shiny new thing for Facebook, we’re using MySQL,” Piantino told Wired. “We treat [MySQL] as a generic engine for data manipulation. We use it as a storage engine. And it’s really efficient."

Although Piantino frames it as a choice, it could have been made out of necessity. Facebook is thought to rely heavily on MySQL, which is ideal for a small system since it's open source and free. Perfect for an ambitious Harvard student starting a social network in his dorm room.

However, MySQL isn't something a massive digital company would pick as its go-to database platform. Derrick Harris expertly lays out the larger issues of Facebook relying on MySQL in this article at GigaOm, where database guru Micheal Stonebreaker calls it a "fate worse than death." However, after speaking with Facebook's MySQL team, Harris subsequently said he "might have been wrong" (thanks to commenter Isaac Sukin for pointing this out).

Facebook is constantly working on improving its MySQL implementation, however, and even has a page dedicated to the issue. It's quite active, and has over 74,000 members.

The biggest stories of the day delivered to your inbox.
These newsletters may contain advertising, deals, or affiliate links. By clicking Subscribe, you confirm you are 16+ and agree to our Terms of Use and Privacy Policy.
Thanks for signing up. See you at your inbox!