A few people from Facebook’s database teams (yes, plural) recently gave a MySQL Tech Talk at Facebook headquarters about how Facebook uses MySQL to process 13 million queries per second. Former Facebook CTO and Quora founded Adam D’Angelo has said that Facebook is “stuck” with PHP and MySQL for legacy reasons, but it sure sounds the Facebook team is making the best of it. Video and notes after the jump.
Watch live streaming video from facebookevents at livestream.com
The main thing Facebook is focusing on is consistency over average response time. “It’s OK if a query is slow as long as it is always slow,” Mark Callahan says. “t’s inconsistency that causes “confusion and unhappy users.”
One of the database performance team members says that the group focuses on edge cases – finding the worst performing queries and then finding ways to fix them.
To find variances in performance Facebook uses Poor Man’s Profiler and number of homegrown tools.
Todd Hoff has a post at High Scalability with some good notes.
I found this particularly interesting following this Hacker News discussion on whether PHP and MySQL are still practical for building web applications.
Image Credit: Massimo Barbieri