Facebook scaling and replication with MySQL

I was wondering how Facebook handled the massive load they get each week. They receive on average 2 million new users each week - wow! Well with all the existing traffic and the new load just how do they cope?

There is a great blog post by Jason Sobel on the Facebook blog here. Some of the nifty tricks include:

  • Replicating the MySQL databases
  • Multiple data centres. One west coast and the other east cost.
  • Splitting traffic dependent on your location effectively load balancing
  • Caching data using memcached (developed for LiveJournal originally)

Those Facebook engineers are crafty. I remember hearing the guys at Friendster also did some similar things with MySQL. There is case study on the MySQL site.

Do you have any scaling advice when using PHP and MySQL?

Leave a Reply