SlideShare a Scribd company logo
Facebook architecture
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+ Platform Apps
   400K+ App Developers
General Design Principles
▪   Use open source where possible
      ▪   Explore making optimizations where needed

▪   Unix Philosophy
      ▪   Keep individual components simple yet performant
      ▪   Combine as necessary
      ▪   Concentrate on clean interface points

▪   Build everything for scale
▪   Try to minimize failure points
▪   Simplicity, Simplicity, Simplicity!
Architecture Overview

        LAMP           +      Services
        PHP                    AdServer
                               Search
        Memcache               Network Selector
                               News Feed
        MySQL                  Blogfeeds
                               CSSParser
              php!             Mobile
                               ShareScraper


                                     !php
                     Thrift
                     Scribe
                     ODS
                     Tools
PHP

▪   Good web programming language
     ▪   Extensive library support for web development
     ▪   Active developer community


▪   Good for rapid iteration
     ▪   Dynamically typed, interpreted scripting language
PHP: What we Learnt
▪   Tough to scale for large code bases
      ▪   Weak typing
      ▪   Limited opportunities for static analysis, code optimizations


▪   Not necessarily optimized for large website use case
      ▪   E.g. No dynamic reloading of files on web server


▪   Linearly increasing cost per included file


▪   Extension framework is difficult to use
PHP: Customizations
▪   Op-code optimization
▪   APC improvements
     ▪   Lazy loading
     ▪   Cache priming
     ▪   More efficient locking semantics for variable cache data

▪   Custom extensions
     ▪   Memcache client extension
     ▪   Serialization format
     ▪   Logging, Stats collection, Monitoring
     ▪   Asynchronous event-handling mechanism
MySQL
▪   Fast, reliable


▪   Used primarily as <key,value> store
      ▪   Data randomly distributed amongst large set of logical instances
      ▪   Most data access based on global id


▪   Large number of logical instances spread out across physical nodes
      ▪   Load balancing at physical node level


▪   No read replication
MySQL: What We Learnt (ing)
▪   Logical migration of data is very difficult


▪   Create a large number of logical dbs, load balance them over varying
    number of physical nodes


▪   No joins in production
      ▪   Logically difficult (because data is distributed randomly)


▪   Easier to scale CPU on web tier
MySQL: What we Learnt (ing)
▪   Most data access is for recent data
      ▪   Optimize table layout for recency
      ▪   Archive older data


▪   Don’t ever store non-static data in a central db
      ▪   CDB makes it easier to perform certain aggregated queries
      ▪   Will not scale


▪   Use services or memcache for global queries
      ▪   E.g.: What are the most popular groups in my network
MySQL: Customizations
▪   No extensive native MySQL modifications


▪   Custom partitioning scheme
     ▪   Global id assigned to all data


▪   Custom archiving scheme
     ▪   Based on frequency and recency of data on a per-user basis


▪   Extended Query Engine for cross-data center replication, cache
    consistency
MySQL: Customizations
▪   Graph based data-access libraries
     ▪   Loosely typed objects (nodes) with limited datatypes (int, varchar, text)
     ▪   Replicated connections (edges)
     ▪   Analogous to distributed foreign keys


▪   Some data collocated
     ▪   Example: User profile data and all of user’s connections


▪   Most data distributed randomly
Memcache
▪   High-Performance, distributed in-memory hash table
▪   Used to alleviate database load
▪   Primary form of caching
▪   Over 25TB of in-memory cache
▪   Average latency < 200 micro-seconds
▪   Cache serialized PHP data structures
▪   Lots and lots of multi-gets to retrieve data spanning across graph edges
Memache: Customizations
▪   Memache over UDP
     ▪   Reduce memory overhead of thousands of TCP connection buffers
     ▪   Application-level flow control (optimization for multi-gets)


▪   On demand aggregation of per-thread stats
     ▪   Reduces global lock contention


▪   Multiple Kernel changes to optimize for Memcache usage
     ▪   Distributing network interrupt handling over multiple cores
     ▪   Opportunistic polling of network interface
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)

▪   Get friend connections
      ▪   Cache, if not DB (based on user-id)

▪   In parallel, fetch last 10 photo album ids for each of my friends
      ▪   Multi-get; individual cache misses fetches data from db (based on photo-
          album id)

▪   Fetch data for most recent photo albums in parallel
▪   Execute page-specific rendering logic in PHP
▪   Return data, make user happy
LAMP is not Perfect
LAMP is not Perfect
▪   PHP+MySQL+Memcache works for a large class of problems but not for
    everything
     ▪   PHP is stateless
     ▪   PHP not the fastest executing language
     ▪   All data is remote

▪   Reasons why services are written
     ▪   Store code closer to data
     ▪   Compiled environment is more efficient
     ▪   Certain functionality only present in other languages
Services Philosophy
▪   Create a service iff required
      ▪   Real overhead for deployment, maintenance, separate code-base
      ▪   Another failure point

▪   Create a common framework and toolset that will allow for easier
    creation of services
      ▪   Thrift
      ▪   Scribe
      ▪   ODS, Alerting service, Monitoring service

▪   Use the right language, library and tool for the task
Thrift




High-Level Goal: Enable transparent interaction between these.
                                                                 …and some others too.
Thrift
▪   Lightweight software framework for cross-language development
▪   Provide IDL, statically generate code
▪   Supported bindings: C++, PHP, Python, Java, Ruby, Erlang, Perl, Haskell
    etc.
▪   Transports: Simple Interface to I/O
     ▪   Tsocket, TFileTransport, TMemoryBuffer

▪   Protocols: Serialization Format
     ▪   TBinaryProtocol, TJSONProtocol

▪   Servers
     ▪   Non-Blocking, Async, Single Threaded, Multi-threaded
Hasn’t this been done before?                      (yes.)


▪   SOAP
       ▪   XML, XML, and more XML

▪   CORBA
       ▪   Bloated? Remote bindings?

▪   COM
       ▪   Face-Win32ClientSoftware.dll-Book

▪   Pillar
       ▪   Slick! But no versioning/abstraction.

▪   Protocol Buffers
Thrift: Why?
•   It’s quick. Really quick.

•   Less time wasted by individual developers
     •   No duplicated networking and protocol code
     •   Less time dealing with boilerplate stuff
     •   Write your client and server in about 5 minutes


•   Division of labor
     •   Work on high-performance servers separate from applications

•   Common toolkit
     •   Fosters code reuse and shared tools
Scribe
▪   Scalable distributed logging framework
▪   Useful for logging a wide array of data
      ▪   Search Redologs
      ▪   Powers news feed publishing
      ▪   A/B testing data

▪   Weak Reliability
      ▪   More reliable than traditional logging but not suitable for database
          transactions.

▪   Simple data model
▪   Built on top of Thrift
Other Tools
▪   SMC (Service Management Console)
     ▪   Centralized configuration
     ▪   Used to determine logical service -> physical node mapping
Other Tools
▪   ODS
     ▪   Used to log and view historical trends for any stats published by service
     ▪   Useful for service monitoring, alerting
Open Source
▪   Thrift
      ▪   http://developers.facebook.com/thrift/



▪   Scribe
      ▪   http://developers.facebook.com/scribe/



▪   PHPEmbed
      ▪   http://developers.facebook.com/phpembed/



▪   More good stuff
      ▪   http://developers.facebook.com/opensource.php
NewsFeed – The Goodz
NewsFeed – The Work
                                                                                       friends’
                                                                                       actions
                                      web tier                           Leaf Server
                        Html

                                        PHP          Actions (Scribe)    Leaf Server
                     home.php                                            Leaf Server
     user

                                          return                         Leaf Server
                                        view state



                                       view                             aggregators
                                       state
                                      storage                                             friends’
                                                                                          actions?
                                                                         aggregating...
- Most arrows indicate thrift calls                                      ranking...
Search – The Goodz
Search – The Work
                    Thrift


                                        search tier
                                         slave             slave   master     slave
                                        index             index    index    index
user
         web tier
                      Scribe     live              db
        PHP                    change            index
                                logs              files




                                           Indexing service




                                           DB Tier
               Updates
Questions?

More info at www.facebook.com/eblog


Aditya Agarwal
aditya@facebook.com

More Related Content

PDF
facebook architecture for 600M users
PPTX
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
PPTX
Introduction to Apache ZooKeeper
PDF
Apache Hadoop 3
PDF
Security Best Practices for your Postgres Deployment
PPTX
HBase and HDFS: Understanding FileSystem Usage in HBase
PPTX
HBaseCon 2013: Apache HBase Table Snapshots
PDF
Intro to HBase
facebook architecture for 600M users
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
Introduction to Apache ZooKeeper
Apache Hadoop 3
Security Best Practices for your Postgres Deployment
HBase and HDFS: Understanding FileSystem Usage in HBase
HBaseCon 2013: Apache HBase Table Snapshots
Intro to HBase

What's hot (20)

PDF
How to Choose the Right Database for Your Workloads
PDF
Log Structured Merge Tree
PPTX
Apache Ranger
PPTX
MongoDB
PDF
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
KEY
Big Data in Real-Time at Twitter
PDF
Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
PPTX
Thrift vs Protocol Buffers vs Avro - Biased Comparison
PDF
Incremental View Maintenance with Coral, DBT, and Iceberg
PDF
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
PPTX
Introduction to MongoDB.pptx
PDF
mysql 8.0 architecture and enhancement
PPTX
Introduction to Redis
PPTX
introduction to NOSQL Database
PDF
Impacts of Sharding, Partitioning, Encoding, and Sorting on Distributed Query...
PPT
Oracle backup and recovery
PPTX
Apache Spark Architecture
PDF
Optimizing Hive Queries
PPTX
Survey of High Performance NoSQL Systems
PDF
Airflow Intro-1.pdf
How to Choose the Right Database for Your Workloads
Log Structured Merge Tree
Apache Ranger
MongoDB
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
Big Data in Real-Time at Twitter
Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Incremental View Maintenance with Coral, DBT, and Iceberg
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
Introduction to MongoDB.pptx
mysql 8.0 architecture and enhancement
Introduction to Redis
introduction to NOSQL Database
Impacts of Sharding, Partitioning, Encoding, and Sorting on Distributed Query...
Oracle backup and recovery
Apache Spark Architecture
Optimizing Hive Queries
Survey of High Performance NoSQL Systems
Airflow Intro-1.pdf
Ad

Similar to Facebook architecture (20)

PDF
PDF
Top ten-list
PPT
Large-scale projects development (scaling LAMP)
PPTX
Membase Meetup - Silicon Valley
PPTX
Apache Spark on HDinsight Training
PDF
[Hi c2011]building mission critical messaging system(guoqiang jerry)
PPTX
HBaseCon 2012 | Building a Large Search Platform on a Shoestring Budget
PPT
Ruby On Rails
PDF
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
KEY
20120306 dublin js
PPTX
Big Data (NJ SQL Server User Group)
PPTX
Architectures, Frameworks and Infrastructure
PPTX
Apache Drill
PPTX
Navigating NoSQL in cloudy skies
PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
PPT
Rubyonrails 090715105949-phpapp01
PPT
6 3 tier architecture php
PPTX
In-memory Databases
PPTX
Scale your Alfresco Solutions
PDF
Turbocharging php applications with zend server (workshop)
Top ten-list
Large-scale projects development (scaling LAMP)
Membase Meetup - Silicon Valley
Apache Spark on HDinsight Training
[Hi c2011]building mission critical messaging system(guoqiang jerry)
HBaseCon 2012 | Building a Large Search Platform on a Shoestring Budget
Ruby On Rails
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
20120306 dublin js
Big Data (NJ SQL Server User Group)
Architectures, Frameworks and Infrastructure
Apache Drill
Navigating NoSQL in cloudy skies
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Rubyonrails 090715105949-phpapp01
6 3 tier architecture php
In-memory Databases
Scale your Alfresco Solutions
Turbocharging php applications with zend server (workshop)
Ad

More from mysqlops (20)

PDF
The simplethebeautiful
PPT
Oracle数据库分析函数详解
PDF
Percona Live 2012PPT:mysql-security-privileges-and-user-management
PDF
Percona Live 2012PPT: introduction-to-mysql-replication
PDF
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
PDF
Percona Live 2012PPT: MySQL Query optimization
PDF
Pldc2012 innodb architecture and internals
PPSX
DBA新人的述职报告
PDF
分布式爬虫
PPSX
MySQL应用优化实践
PPT
eBay EDW元数据管理及应用
PPT
基于协程的网络开发框架的设计与实现
PPT
eBay基于Hadoop平台的用户邮件数据分析
PPSX
对MySQL DBA的一些思考
PPT
QQ聊天系统后台架构的演化与启示
PPT
腾讯即时聊天IM1.4亿在线背后的故事
PDF
分布式存储与TDDL
PDF
MySQL数据库生产环境维护
PDF
Memcached
PDF
DevOPS
The simplethebeautiful
Oracle数据库分析函数详解
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: MySQL Cluster And NDB Cluster
Percona Live 2012PPT: MySQL Query optimization
Pldc2012 innodb architecture and internals
DBA新人的述职报告
分布式爬虫
MySQL应用优化实践
eBay EDW元数据管理及应用
基于协程的网络开发框架的设计与实现
eBay基于Hadoop平台的用户邮件数据分析
对MySQL DBA的一些思考
QQ聊天系统后台架构的演化与启示
腾讯即时聊天IM1.4亿在线背后的故事
分布式存储与TDDL
MySQL数据库生产环境维护
Memcached
DevOPS

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
cuic standard and advanced reporting.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Modernizing your data center with Dell and AMD
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
DOCX
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
GamePlan Trading System Review: Professional Trader's Honest Take
cuic standard and advanced reporting.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Modernizing your data center with Dell and AMD
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
Advanced Soft Computing BINUS July 2025.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The AUB Centre for AI in Media Proposal.docx

Facebook architecture

  • 3. Agenda 1 Architecture Overview 2 PHP, MySQL, Memcache 3 Thrift, Scribe, Tools 4 News Feed Architecture
  • 4. At a Glance The Social Graph 120M+ active users 50B+ PVs per month 10B+ Photos 1B+ connections 50K+ Platform Apps 400K+ App Developers
  • 5. General Design Principles ▪ Use open source where possible ▪ Explore making optimizations where needed ▪ Unix Philosophy ▪ Keep individual components simple yet performant ▪ Combine as necessary ▪ Concentrate on clean interface points ▪ Build everything for scale ▪ Try to minimize failure points ▪ Simplicity, Simplicity, Simplicity!
  • 6. Architecture Overview LAMP + Services PHP AdServer Search Memcache Network Selector News Feed MySQL Blogfeeds CSSParser php! Mobile ShareScraper !php Thrift Scribe ODS Tools
  • 7. PHP ▪ Good web programming language ▪ Extensive library support for web development ▪ Active developer community ▪ Good for rapid iteration ▪ Dynamically typed, interpreted scripting language
  • 8. PHP: What we Learnt ▪ Tough to scale for large code bases ▪ Weak typing ▪ Limited opportunities for static analysis, code optimizations ▪ Not necessarily optimized for large website use case ▪ E.g. No dynamic reloading of files on web server ▪ Linearly increasing cost per included file ▪ Extension framework is difficult to use
  • 9. PHP: Customizations ▪ Op-code optimization ▪ APC improvements ▪ Lazy loading ▪ Cache priming ▪ More efficient locking semantics for variable cache data ▪ Custom extensions ▪ Memcache client extension ▪ Serialization format ▪ Logging, Stats collection, Monitoring ▪ Asynchronous event-handling mechanism
  • 10. MySQL ▪ Fast, reliable ▪ Used primarily as <key,value> store ▪ Data randomly distributed amongst large set of logical instances ▪ Most data access based on global id ▪ Large number of logical instances spread out across physical nodes ▪ Load balancing at physical node level ▪ No read replication
  • 11. MySQL: What We Learnt (ing) ▪ Logical migration of data is very difficult ▪ Create a large number of logical dbs, load balance them over varying number of physical nodes ▪ No joins in production ▪ Logically difficult (because data is distributed randomly) ▪ Easier to scale CPU on web tier
  • 12. MySQL: What we Learnt (ing) ▪ Most data access is for recent data ▪ Optimize table layout for recency ▪ Archive older data ▪ Don’t ever store non-static data in a central db ▪ CDB makes it easier to perform certain aggregated queries ▪ Will not scale ▪ Use services or memcache for global queries ▪ E.g.: What are the most popular groups in my network
  • 13. MySQL: Customizations ▪ No extensive native MySQL modifications ▪ Custom partitioning scheme ▪ Global id assigned to all data ▪ Custom archiving scheme ▪ Based on frequency and recency of data on a per-user basis ▪ Extended Query Engine for cross-data center replication, cache consistency
  • 14. MySQL: Customizations ▪ Graph based data-access libraries ▪ Loosely typed objects (nodes) with limited datatypes (int, varchar, text) ▪ Replicated connections (edges) ▪ Analogous to distributed foreign keys ▪ Some data collocated ▪ Example: User profile data and all of user’s connections ▪ Most data distributed randomly
  • 15. Memcache ▪ High-Performance, distributed in-memory hash table ▪ Used to alleviate database load ▪ Primary form of caching ▪ Over 25TB of in-memory cache ▪ Average latency < 200 micro-seconds ▪ Cache serialized PHP data structures ▪ Lots and lots of multi-gets to retrieve data spanning across graph edges
  • 16. Memache: Customizations ▪ Memache over UDP ▪ Reduce memory overhead of thousands of TCP connection buffers ▪ Application-level flow control (optimization for multi-gets) ▪ On demand aggregation of per-thread stats ▪ Reduces global lock contention ▪ Multiple Kernel changes to optimize for Memcache usage ▪ Distributing network interrupt handling over multiple cores ▪ Opportunistic polling of network interface
  • 17. Let’s put this into action
  • 18. Under the Covers ▪ Get my profile data ▪ Fetch from cache, potentially go to my DB (based on user-id) ▪ Get friend connections ▪ Cache, if not DB (based on user-id) ▪ In parallel, fetch last 10 photo album ids for each of my friends ▪ Multi-get; individual cache misses fetches data from db (based on photo- album id) ▪ Fetch data for most recent photo albums in parallel ▪ Execute page-specific rendering logic in PHP ▪ Return data, make user happy
  • 19. LAMP is not Perfect
  • 20. LAMP is not Perfect ▪ PHP+MySQL+Memcache works for a large class of problems but not for everything ▪ PHP is stateless ▪ PHP not the fastest executing language ▪ All data is remote ▪ Reasons why services are written ▪ Store code closer to data ▪ Compiled environment is more efficient ▪ Certain functionality only present in other languages
  • 21. Services Philosophy ▪ Create a service iff required ▪ Real overhead for deployment, maintenance, separate code-base ▪ Another failure point ▪ Create a common framework and toolset that will allow for easier creation of services ▪ Thrift ▪ Scribe ▪ ODS, Alerting service, Monitoring service ▪ Use the right language, library and tool for the task
  • 22. Thrift High-Level Goal: Enable transparent interaction between these. …and some others too.
  • 23. Thrift ▪ Lightweight software framework for cross-language development ▪ Provide IDL, statically generate code ▪ Supported bindings: C++, PHP, Python, Java, Ruby, Erlang, Perl, Haskell etc. ▪ Transports: Simple Interface to I/O ▪ Tsocket, TFileTransport, TMemoryBuffer ▪ Protocols: Serialization Format ▪ TBinaryProtocol, TJSONProtocol ▪ Servers ▪ Non-Blocking, Async, Single Threaded, Multi-threaded
  • 24. Hasn’t this been done before? (yes.) ▪ SOAP ▪ XML, XML, and more XML ▪ CORBA ▪ Bloated? Remote bindings? ▪ COM ▪ Face-Win32ClientSoftware.dll-Book ▪ Pillar ▪ Slick! But no versioning/abstraction. ▪ Protocol Buffers
  • 25. Thrift: Why? • It’s quick. Really quick. • Less time wasted by individual developers • No duplicated networking and protocol code • Less time dealing with boilerplate stuff • Write your client and server in about 5 minutes • Division of labor • Work on high-performance servers separate from applications • Common toolkit • Fosters code reuse and shared tools
  • 26. Scribe ▪ Scalable distributed logging framework ▪ Useful for logging a wide array of data ▪ Search Redologs ▪ Powers news feed publishing ▪ A/B testing data ▪ Weak Reliability ▪ More reliable than traditional logging but not suitable for database transactions. ▪ Simple data model ▪ Built on top of Thrift
  • 27. Other Tools ▪ SMC (Service Management Console) ▪ Centralized configuration ▪ Used to determine logical service -> physical node mapping
  • 28. Other Tools ▪ ODS ▪ Used to log and view historical trends for any stats published by service ▪ Useful for service monitoring, alerting
  • 29. Open Source ▪ Thrift ▪ http://developers.facebook.com/thrift/ ▪ Scribe ▪ http://developers.facebook.com/scribe/ ▪ PHPEmbed ▪ http://developers.facebook.com/phpembed/ ▪ More good stuff ▪ http://developers.facebook.com/opensource.php
  • 31. NewsFeed – The Work friends’ actions web tier Leaf Server Html PHP Actions (Scribe) Leaf Server home.php Leaf Server user return Leaf Server view state view aggregators state storage friends’ actions? aggregating... - Most arrows indicate thrift calls ranking...
  • 32. Search – The Goodz
  • 33. Search – The Work Thrift search tier slave slave master slave index index index index user web tier Scribe live db PHP change index logs files Indexing service DB Tier Updates
  • 34. Questions? More info at www.facebook.com/eblog Aditya Agarwal aditya@facebook.com