SlideShare a Scribd company logo
1 of 21
Facebook
    Scaling Walkthrough

Moritz Haarmann - Ultrasuperlargescale Systems
Numbers
•   800.000.000 active users

•   > 50% log on every given day

•   250.000.000 Photos every single day ( Flickr:
    6Bn total )

•   30.000.000.000 new pieces of content monthly
30.000.000.000
30.000.000.000
As if everyone now living on earth posts 4.28 updates every month.
Building Blocks
Facebook is built using



•   Web Servers ( Running Hip-Hop PHP )

•   Services ( Search, Ads )

•   Memcached & MySQL

•   Immense amounts of glue
Write Strategy

•   Writes take place centrally in California

•   3.5 Million Changed Rows per Second ( Peak )

•   2010: 1800 DB Servers

•   horizontal scaling approach not disclosed

•   consistency is important ( avoiding „unhappy
    users“ )
Glue

•   Massively distributed architecture

•   Glue keeping it together

•   Many systems built in-house to meet
    giiaaanoourmus requirements
Haystack


•   Photos

•   Handles everything from HTTP to storage

•   Aimed at minimizing IO-Operations

•   Append-Only!
Memcached


•   Placed between MySQL and Web Tier

•   Stores only „plain data“, no joins or other
    complicated stuff

•   Faster if Web Server works on data
BigPipe


•   Assembles the output pages

•   everything that is needed retrieved in parallel

•   Fault tolerant, will work even if parts of a page
    are not available
What else?
Live Profiling


•   Facebook monitors their life systems
    continously at a PHP-Method level ( using
    XHProf ).
Graceful Degradation


•   High awareness ( Monitoring ) of perfomance
    problems

•   Features can be disabled ( very ne-grained )
    to keep the core features running smoothly
Keeping it running


•   New features are launched ,dark‘, without
    visible elements, to stress test the backend
    with real load

•   Incremental roll-outs decrease the impact of
    bug or malfunction
Open Source



•   Most parts are open source

•   Either used or created and then os‘d
Big Bang

             •     On September 23, 2010, Facebook was down
                   for most users for about 3 hours

             •     A wrongly identi ed ,invalid‘ cache value lead
                   to requests hammering the DB tier

             •     A system designed to prevent failures created
                   one!

             •     Only way to recover was to completely shut
                   down access to the DB - downtime

https://www.facebook.com/note.php?note_id=431441338919&id=9445547199&ref=mf ( great comments, too )
Thanks.
Sources

•   http://royal.pingdom.com/2010/06/18/the-software-behind-
    facebook/

•   https://www.facebook.com/note.php?note_id=76191543919

•   https://www.facebook.com/notes/facebook-engineering/bigpipe-
    pipelining-web-pages-for-high-performance/389414033919

•   http://blog.kissmetrics.com/facebook-statistics/

More Related Content

Viewers also liked

Mau 2015 scaling facebook at care.com
Mau 2015   scaling facebook at care.com Mau 2015   scaling facebook at care.com
Mau 2015 scaling facebook at care.com Grow.co
 
Marketing and Technology Go Hand-in Hand, But Where are They Going?
Marketing and Technology Go Hand-in Hand, But Where are They Going? Marketing and Technology Go Hand-in Hand, But Where are They Going?
Marketing and Technology Go Hand-in Hand, But Where are They Going? Mogul Marketing
 
Use open source and rapid prototyping to put magic in magical products in IoT
Use open source and rapid prototyping to put magic in magical products in IoTUse open source and rapid prototyping to put magic in magical products in IoT
Use open source and rapid prototyping to put magic in magical products in IoTMoe Tanabian
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
The Performance Marketer's Guide to Scaling Growth with Mobile App Install Ads
The Performance Marketer's Guide to Scaling Growth with Mobile App Install AdsThe Performance Marketer's Guide to Scaling Growth with Mobile App Install Ads
The Performance Marketer's Guide to Scaling Growth with Mobile App Install AdsNanigans
 
Simple Web Design Case Study (Website Design Process Walkthrough)
Simple Web Design Case Study (Website Design Process Walkthrough)Simple Web Design Case Study (Website Design Process Walkthrough)
Simple Web Design Case Study (Website Design Process Walkthrough)Followbright
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016Ricardo Amaro
 
Site Reliability Engineering Helps Google Conquer The World
Site Reliability Engineering Helps Google Conquer The WorldSite Reliability Engineering Helps Google Conquer The World
Site Reliability Engineering Helps Google Conquer The WorldVistara
 

Viewers also liked (12)

Google Go Overview
Google Go OverviewGoogle Go Overview
Google Go Overview
 
Mau 2015 scaling facebook at care.com
Mau 2015   scaling facebook at care.com Mau 2015   scaling facebook at care.com
Mau 2015 scaling facebook at care.com
 
Marketing and Technology Go Hand-in Hand, But Where are They Going?
Marketing and Technology Go Hand-in Hand, But Where are They Going? Marketing and Technology Go Hand-in Hand, But Where are They Going?
Marketing and Technology Go Hand-in Hand, But Where are They Going?
 
Use open source and rapid prototyping to put magic in magical products in IoT
Use open source and rapid prototyping to put magic in magical products in IoTUse open source and rapid prototyping to put magic in magical products in IoT
Use open source and rapid prototyping to put magic in magical products in IoT
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
The Performance Marketer's Guide to Scaling Growth with Mobile App Install Ads
The Performance Marketer's Guide to Scaling Growth with Mobile App Install AdsThe Performance Marketer's Guide to Scaling Growth with Mobile App Install Ads
The Performance Marketer's Guide to Scaling Growth with Mobile App Install Ads
 
Simple Web Design Case Study (Website Design Process Walkthrough)
Simple Web Design Case Study (Website Design Process Walkthrough)Simple Web Design Case Study (Website Design Process Walkthrough)
Simple Web Design Case Study (Website Design Process Walkthrough)
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016
 
Site Reliability Engineering Helps Google Conquer The World
Site Reliability Engineering Helps Google Conquer The WorldSite Reliability Engineering Helps Google Conquer The World
Site Reliability Engineering Helps Google Conquer The World
 
Die Android Plattform
Die Android PlattformDie Android Plattform
Die Android Plattform
 

Similar to Facebook Scaling Overview

Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionNguyen Tung
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Jeremy Likness
 
Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]Koushik Reddy
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App TodayChris Love
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applicationsTalbott Crowell
 
UK Community day 20180427 Microsoft Flow hackathon
UK Community day 20180427 Microsoft Flow hackathonUK Community day 20180427 Microsoft Flow hackathon
UK Community day 20180427 Microsoft Flow hackathonPenny Coventry
 
How Facebook actually works????
How Facebook actually works????How Facebook actually works????
How Facebook actually works????Dhruv Patel
 
EscConf - Deep Dive Frontend Optimization
EscConf - Deep Dive Frontend OptimizationEscConf - Deep Dive Frontend Optimization
EscConf - Deep Dive Frontend OptimizationJonathan Klein
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.Rishikese MR
 
Modernize Solutions with SharePoint & the Power Platform
Modernize Solutions with SharePoint & the Power PlatformModernize Solutions with SharePoint & the Power Platform
Modernize Solutions with SharePoint & the Power PlatformJonathan Schultz
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applicationsAmit Kejriwal
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Static Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource ConditionStatic Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource ConditionIWMW
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?CQD
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M usersJongyoon Choi
 
Four Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsFour Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsAndreas Grabner
 
BaaS Comparison - iOS.mn
BaaS Comparison - iOS.mnBaaS Comparison - iOS.mn
BaaS Comparison - iOS.mnpyro2927
 

Similar to Facebook Scaling Overview (20)

Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open Discussion
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]
 
10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today10 Things You Can Do to Speed Up Your Web App Today
10 Things You Can Do to Speed Up Your Web App Today
 
Fb mechanism
Fb mechanismFb mechanism
Fb mechanism
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
 
Build social apps for Facebook
Build social apps for FacebookBuild social apps for Facebook
Build social apps for Facebook
 
UK Community day 20180427 Microsoft Flow hackathon
UK Community day 20180427 Microsoft Flow hackathonUK Community day 20180427 Microsoft Flow hackathon
UK Community day 20180427 Microsoft Flow hackathon
 
How Facebook actually works????
How Facebook actually works????How Facebook actually works????
How Facebook actually works????
 
EscConf - Deep Dive Frontend Optimization
EscConf - Deep Dive Frontend OptimizationEscConf - Deep Dive Frontend Optimization
EscConf - Deep Dive Frontend Optimization
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
 
Modernize Solutions with SharePoint & the Power Platform
Modernize Solutions with SharePoint & the Power PlatformModernize Solutions with SharePoint & the Power Platform
Modernize Solutions with SharePoint & the Power Platform
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Static Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource ConditionStatic Site Generators - Developing Websites in Low-resource Condition
Static Site Generators - Developing Websites in Low-resource Condition
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?
 
facebook architecture for 600M users
facebook architecture for 600M usersfacebook architecture for 600M users
facebook architecture for 600M users
 
Four Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsFour Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance Problems
 
BaaS Comparison - iOS.mn
BaaS Comparison - iOS.mnBaaS Comparison - iOS.mn
BaaS Comparison - iOS.mn
 
Frontender in-2016
Frontender in-2016Frontender in-2016
Frontender in-2016
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Facebook Scaling Overview

  • 1. Facebook Scaling Walkthrough Moritz Haarmann - Ultrasuperlargescale Systems
  • 3. 800.000.000 active users • > 50% log on every given day • 250.000.000 Photos every single day ( Flickr: 6Bn total ) • 30.000.000.000 new pieces of content monthly
  • 5. 30.000.000.000 As if everyone now living on earth posts 4.28 updates every month.
  • 7. Facebook is built using • Web Servers ( Running Hip-Hop PHP ) • Services ( Search, Ads ) • Memcached & MySQL • Immense amounts of glue
  • 8. Write Strategy • Writes take place centrally in California • 3.5 Million Changed Rows per Second ( Peak ) • 2010: 1800 DB Servers • horizontal scaling approach not disclosed • consistency is important ( avoiding „unhappy users“ )
  • 9. Glue • Massively distributed architecture • Glue keeping it together • Many systems built in-house to meet giiaaanoourmus requirements
  • 10. Haystack • Photos • Handles everything from HTTP to storage • Aimed at minimizing IO-Operations • Append-Only!
  • 11. Memcached • Placed between MySQL and Web Tier • Stores only „plain data“, no joins or other complicated stuff • Faster if Web Server works on data
  • 12. BigPipe • Assembles the output pages • everything that is needed retrieved in parallel • Fault tolerant, will work even if parts of a page are not available
  • 13.
  • 15. Live Profiling • Facebook monitors their life systems continously at a PHP-Method level ( using XHProf ).
  • 16. Graceful Degradation • High awareness ( Monitoring ) of perfomance problems • Features can be disabled ( very ne-grained ) to keep the core features running smoothly
  • 17. Keeping it running • New features are launched ,dark‘, without visible elements, to stress test the backend with real load • Incremental roll-outs decrease the impact of bug or malfunction
  • 18. Open Source • Most parts are open source • Either used or created and then os‘d
  • 19. Big Bang • On September 23, 2010, Facebook was down for most users for about 3 hours • A wrongly identi ed ,invalid‘ cache value lead to requests hammering the DB tier • A system designed to prevent failures created one! • Only way to recover was to completely shut down access to the DB - downtime https://www.facebook.com/note.php?note_id=431441338919&id=9445547199&ref=mf ( great comments, too )
  • 21. Sources • http://royal.pingdom.com/2010/06/18/the-software-behind- facebook/ • https://www.facebook.com/note.php?note_id=76191543919 • https://www.facebook.com/notes/facebook-engineering/bigpipe- pipelining-web-pages-for-high-performance/389414033919 • http://blog.kissmetrics.com/facebook-statistics/