What is Facebook’s secret for handling all the status updates, timelines, "likes," and embarrassing party pictures of nearly one billion people? Let’s repeat that. One billion people. One seventh of the entire human race (not counting those with “alter-ego” Facebook accounts). Facebook must have perfected some super-optimized, distributed, top secret database technology that could make the algorithm wizards at Google cry, right?
Actually, they use MySQL.
Well, that is a bit of a simplification. Facebook started out with MySQL, has built its core functionalities out of the technology, has hired some of the best available database engineers, and has been successful in enabling it to scale up with the impressive growth of the user base. Needless to say it has driven the capacity of MySQL to its limit and it remains to be seen if some prophets of doom are to be vindicated in saying that everything is soon to unravel.
For a little background, MySQL is generally held as the world’s most popular database system. Its success can be attributed to the fact that it formed the database component of entirely open-source web servers: the combination of Linux, Apache, MySQL, and Perl/PHP that came to be known as LAMP. Not surprisingly, it also acts as the default backend database to WordPress, Joomla, and Drupal, the most well-known web content management systems.
Since it has been the go-to database for most small web projects, including Facebook back when it was a social tool for the Harvard student body, there is an inherent complication when these smaller projects experience exponential growth.
However, Facebook’s MySQL solution is able to handle 60 million queries per second. This is mostly due to its use of 4,000 shards (a database principle that allows for distribution of database rows) and 9,000 instances of memcached (a caching system developed to improve the performance of user content driven sites). It is also due to the ingenuity of its people and perhaps the unexpected durability of the web’s most popular database. Contact us to learn more about the future of MySQL and the viability of other technologies that have helped the web expand.