Home > Software Development > Critical Lessons Learned at Facebook on Scalability and Reliability

Critical Lessons Learned at Facebook on Scalability and Reliability

November 21st, 2010 Leave a comment Go to comments

Facebook.com is no doubt the biggest web site surpassing Google in terms of Web traffics in an article published half year ago. Given its scale, the lessons learned would be very helpful for others to build scalable IT infrastructures. This post is based on my notes taken at the talk by Robert Johnson and Sanjeev Kumar at LISA 2010 conference. Should there be any mistakes, they are all mine.

According to the speakers, the architecture of Facebook.com is relatively simple: Web servers in the front, databases at the back. In the middle is a caching layer with a lot of memcached servers. If you recall my previous post, they use PHP extensively.

Time to learn how to "Google" and manage your VMware and clouds in a fast and secure

HTML5 App

Unlike other sites, like email sites, whose users are well mapped and isolated to different servers, social Websites like Facebook have unique challenges in that their users are linked together. Errors in one part of a system may cascade easily and bring down the whole site.

Here are several important lessons Facebook learned while building software and operating the site:

  1. Only change one thing at a time.
    A small change can cause a big problem. Changing one thing at a time can back-trace following problems to the change. To facilitate these small changes, you need supporting infrastructure like configuration management system.
  2. No single point of failures
    1. Redundant hardware at every level from load balancers to network links.
    2. Software can be a SPOF as well
  3. Don’t make small problems big
    1. Don’t push problems upstream
    2. Be aware of smart failovers, which can be dangerous
    3. Shutdown load when in trouble
    4. Reduce system startup time
  4. Measure everything
    1. Data is key: activities, performance stats, failure rates
    2. Discover problems that you didn’t know you had through analysis
  5. Always do a post-mortem
    1. Weekly review
    2. Focusing on issues not blame
    3. Identify technical and organizational issues and follow-up actions
  6. Culture is important
    1. Release often
    2. Control and responsibility

  1. April 2nd, 2014 at 15:57 | #1

    Hi, that is a pretty useful site. Great job. Thanks.

  1. No trackbacks yet.