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

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

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/