Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Facebook Architecture



Aditya Agarwal
Director of Engineering
11/22/2008
Agenda
 1   Architecture Overview

 2   PHP, MySQL, Memcache

 3   Thrift, Scribe, Tools

 4   News Feed Architecture
At a Glance
   The Social Graph
   120M+ active users
   50B+ PVs per month
   10B+ Photos
   1B+ connections
   50K+ Plat...
General Design Principles
    Use open source where possible
▪

          Explore making optimizations where needed
      ...
Architecture Overview

        LAMP           +      Services
        PHP                    AdServer
                    ...
PHP

    Good web programming language
▪

         Extensive library support for web development
     ▪


         Active ...
PHP: What we Learnt
    Tough to scale for large code bases
▪

          Weak typing
      ▪

          Limited opportunit...
PHP: Customizations
    Op-code optimization
▪

    APC improvements
▪

         Lazy loading
     ▪


         Cache prim...
MySQL
    Fast, reliable
▪



    Used primarily as <key,value> store
▪

          Data randomly distributed amongst large...
MySQL: What We Learnt (ing)
    Logical migration of data is very difficult
▪




    Create a large number of logical dbs...
MySQL: What we Learnt (ing)
    Most data access is for recent data
▪

          Optimize table layout for recency
      ▪...
MySQL: Customizations
    No extensive native MySQL modifications
▪



    Custom partitioning scheme
▪

         Global i...
MySQL: Customizations
    Graph based data-access libraries
▪

         Loosely typed objects (nodes) with limited datatyp...
Memcache
    High-Performance, distributed in-memory hash table
▪

    Used to alleviate database load
▪

    Primary form...
Memache: Customizations
    Memache over UDP
▪

         Reduce memory overhead of thousands of TCP connection buffers
   ...
Let’s put this into action
Under the Covers
    Get my profile data
▪

          Fetch from cache, potentially go to my DB (based on user-id)
      ▪...
LAMP is not Perfect
LAMP is not Perfect
    PHP+MySQL+Memcache works for a large class of problems but not for
▪

    everything
         PHP ...
Services Philosophy
    Create a service iff required
▪

          Real overhead for deployment, maintenance, separate cod...
Thrift




High-Level Goal: Enable transparent interaction between these.
                                                ...
Thrift
    Lightweight software framework for cross-language development
▪

    Provide IDL, statically generate code
▪

 ...
Hasn’t this been done before?                      (yes.)


    SOAP
▪

           XML, XML, and more XML
       ▪



    ...
Thrift: Why?
    It’s quick. Really quick.
•


    Less time wasted by individual developers
•
         No duplicated netw...
Scribe
    Scalable distributed logging framework
▪

    Useful for logging a wide array of data
▪

          Search Redol...
Other Tools
    SMC (Service Management Console)
▪

         Centralized configuration
     ▪


         Used to determine...
Other Tools
    ODS
▪

         Used to log and view historical trends for any stats published by service
     ▪


       ...
Open Source
    Thrift
▪

          http://developers.facebook.com/thrift/
      ▪




    Scribe
▪
          http://devel...
NewsFeed – The Goodz
NewsFeed – The Work
                                                                                       friends’
      ...
Search – The Goodz
Search – The Work
                    Thrift


                                        search tier
                       ...
Questions?

More info at www.facebook.com/eblog


Aditya Agarwal
aditya@facebook.com
Other Tools ODS ▪ Used
Upcoming SlideShare
Loading in …5
×

Other Tools ODS ▪ Used Qcon

33,928 views

Published on

Other Tools
ODS


Used to log and view historical trends for any stats published by service



Useful for service monitoring, alerting

Published in: Technology
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2F7hN3u ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❤❤❤ http://bit.ly/2F7hN3u ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • New version http://www.mediafire.com/download/7gr3eyz6u26b89n

    Facebook hacking 2013 is easier than people think.There are different types of automated tools(both free and paid) that can do it for you, brute force crackers,sql injectors,astreak decoders etc. I personally recommend this free brute force cracker called chinaman facebook hacker. see link to it on my channel.why i recommend this? cuz its the easiest to use and guaranteed to crack your victims password(some softwares give you the wrong password) and it uses an online server to crack passwords
    hack facebook password 2013
    facebook hack password
    facebook hack
    facebook hack password
    facebook hack password free
    facebook hack attack
    facebook hack mediafire
    facebook hack password 2013 free download
    facebook hack no survey
    facebook hack password
    Download From Here http://bit.ly/mighty1
    -------------------------------------------------------------------------

    how to hack facebook
    how to hack facebook passwords
    how to hack facebook accounts
    how to hack facebook passwords for free no download
    how to hack facebook passwords without software
    how to hack facebook accounts for free no download
    how to hack facebook passwords without downloading anything
    how to hack facebook passwords for free
    how to hack facebook accounts for free
    how to hack facebook accounts without downloading
    hack facebook password
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ODS
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • THANKS ! Good weekend.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

×