SlideShare a Scribd company logo
1 of 45
Download to read offline
About Haystack
                        Tomohiro MITSUMUNE
                                   2009/11/26




2009   12   2
Agenda

                • about Facebook
                • Old Photo Store system
                • Haystack Store system


2009   12   2
Facebook


                •       SNS(   : 250,000,000)

                •   1




2009   12   2
Photo App in Facebook
                • 150
                •                          4



                 •      600   1.5PB

                •1              2     2    25TB

                •                550,000

2009   12   2
Old Facebook System



2009   12   2
NFS Photo Infrastructure
                •   Upload

                    •
                             NFS

                •   Photo serving

                    •              HTTP   NFS



                •   NFS storage

                    •
2009   12   2
NFS Photo Infrastructure

                •
                •                      i



                • NFS
                                multiple I/O
                    Operation

2009   12   2
NFS Photo Infrastructure

                •      NFS




                •    CDN



2009   12   2
Additonal Optimization
                • Cachr
                 • Facebook

                • NFS file handle cache
                 • NFS
                        photo serving
2009   12   2
New Facebook System



2009   12   2
Haystack Photo Infrastructure

                • photo serving   storage   1

                • HTTP
                •

                •        I/O


2009   12   2
Haystack Photo Infrastructure

                • HTTP Server
                • Photo Store
                • Haystack Object Store
                • Filesystem
                • Storage

2009   12   2
Storage



2009   12   2
Storage
                •          2U

                • 2 x quad-core CPUs
                • 16GB - 32GB
                •               RAID        (256MB
                  - 512MB NVRAM cache   )

                • 12 + 1 TB SATA HDD
2009   12   2
Storage
                •            1       10TB

                • RAID-6
                  •

                •          NVRAM   write-back



2009   12   2
Storage
                •
                        NVRAM



                •
                    •

2009   12   2
Filesystem



2009   12   2
Filesystem
                • 10TB       1

                • inode
                •                    2

                  •
                  •
2009   12   2
                • Haystack                XFS
Block based filesystem

                •


                •

2009   12   2
Extent based filesystem
                •

                •


                •
2009   12   2
Haystack Object Store



2009   12   2
Haystack Object Store
                • Needle


                •2
                 • Haystack Store file (   )

                 •
2009   12   2
Haystack Store File




                  8KB


2009   12   2
Needles




2009   12   2
Needles

                • <Needle Offset, Key, Alternate Key,
                  Cookie>

                • Offset   haystack store



                • Key        OK



2009   12   2
Index




2009   12   2
Index
                •

                •

                •   haystack store file




2009   12   2
Haystack Write
                       Operation
                •          Needle Store file



                • Needle

                •

2009   12   2
Haystack Write
                          Operation
                •
                        flush

                •                            <Key,
                    Alternate Key, Cookie>

                • Needle
2009   12   2
Haystack Read
                         Operation
                • Needle offset, Key, Alternate Key, Cookie,
                  Data size

                • Key   Alaternate Key Cookie




2009   12   2
Haystack Delete
                      Operation
                •                ‘deleted’



                •       Needle



                •

2009   12   2
Photo Store



2009   12   2
Photo Store

                • HTTP
                •
                 Haystack Store Object   /




2009   12   2
Photo Store
                •      I/O




                •

                •            Google Sparse Hash

2009   12   2
Photo Store
                •                            64bit   ID
                                 4

                •                            Cookie 64bit



                •                        (large, medium, small,
                    thumbnail)   Alternate

2009   12   2
in-memory Index




2009   12   2
Photo Store Write/
                     Modify Operation
                • haystack

                •



2009   12   2
Photo Store Read
                       Operation
                • haystack id, photo key,    , cookie



                • photo key
                                    Needle



2009   12   2
Photo Store Delete
                      Operation

                • Haystack Delete Operation
                                              0




2009   12   2
Compaction

                •              (   )   Needle




                •
                    haystack



2009   12   2
HTTP Server



2009   12   2
HTTP Server
                • libevent               evhttp

                •            1    1



                •            I/O bound




2009   12   2
• HTTP
                •

                •


2009   12   2
Thank you for
                your kind attention


2009   12   2
References
                • http://www.facebook.com/note.php?
                  note_id=76191543919
                • http://www.niallkennedy.com/blog/2009/04/
                  facebook-haystack.html
                • http://perspectives.mvdirona.com/
                  2008/06/30/
                  FacebookNeedleInAHaystackEfficientStorag
                  eOfBillionsOfPhotos.aspx


2009   12   2

More Related Content

What's hot

OSS Presentation by Bryan Badger
OSS Presentation by Bryan BadgerOSS Presentation by Bryan Badger
OSS Presentation by Bryan Badger
OpenStorageSummit
 
What's New in MySQL 5.6
What's New in MySQL 5.6What's New in MySQL 5.6
What's New in MySQL 5.6
Santo Leto
 
MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012
Sean Laurent
 
Ceph Day Seoul - Ceph: a decade in the making and still going strong
Ceph Day Seoul - Ceph: a decade in the making and still going strong Ceph Day Seoul - Ceph: a decade in the making and still going strong
Ceph Day Seoul - Ceph: a decade in the making and still going strong
Ceph Community
 
UKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA'sUKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA's
FromDual GmbH
 
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql ClusterSanto Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
Santo Leto
 

What's hot (20)

OSS Presentation by Bryan Badger
OSS Presentation by Bryan BadgerOSS Presentation by Bryan Badger
OSS Presentation by Bryan Badger
 
Percona Live 4/14/15: Leveraging open stack cinder for peak application perfo...
Percona Live 4/14/15: Leveraging open stack cinder for peak application perfo...Percona Live 4/14/15: Leveraging open stack cinder for peak application perfo...
Percona Live 4/14/15: Leveraging open stack cinder for peak application perfo...
 
MariaDB Prez by Joffrey Michaie
MariaDB Prez by Joffrey MichaieMariaDB Prez by Joffrey Michaie
MariaDB Prez by Joffrey Michaie
 
What's New in MySQL 5.6
What's New in MySQL 5.6What's New in MySQL 5.6
What's New in MySQL 5.6
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
 
Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0Differences between MariaDB 10.3 & MySQL 8.0
Differences between MariaDB 10.3 & MySQL 8.0
 
What is Trove, the Database as a Service on OpenStack?
What is Trove, the Database as a Service on OpenStack?What is Trove, the Database as a Service on OpenStack?
What is Trove, the Database as a Service on OpenStack?
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmap
 
MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
 
Ceph Day Seoul - Ceph: a decade in the making and still going strong
Ceph Day Seoul - Ceph: a decade in the making and still going strong Ceph Day Seoul - Ceph: a decade in the making and still going strong
Ceph Day Seoul - Ceph: a decade in the making and still going strong
 
Mohssen cv
Mohssen cvMohssen cv
Mohssen cv
 
High Performance Drupal with MariaDB
High Performance Drupal with MariaDBHigh Performance Drupal with MariaDB
High Performance Drupal with MariaDB
 
OSCON2014: Understanding Hypervisor Selection in Apache CloudStack
OSCON2014: Understanding Hypervisor Selection in Apache CloudStackOSCON2014: Understanding Hypervisor Selection in Apache CloudStack
OSCON2014: Understanding Hypervisor Selection in Apache CloudStack
 
UKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA'sUKOUG 2011: MySQL Architectures for Oracle DBA's
UKOUG 2011: MySQL Architectures for Oracle DBA's
 
What is MariaDB Server 10.3?
What is MariaDB Server 10.3?What is MariaDB Server 10.3?
What is MariaDB Server 10.3?
 
How to Design a Scalable Private Cloud
How to Design a Scalable Private CloudHow to Design a Scalable Private Cloud
How to Design a Scalable Private Cloud
 
Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011
 
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql ClusterSanto Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
Santo Leto - MySQL Connect 2012 - Getting Started with Mysql Cluster
 

Viewers also liked (7)

勉強会のすすめ
勉強会のすすめ勉強会のすすめ
勉強会のすすめ
 
はじめてのSymfony2
はじめてのSymfony2はじめてのSymfony2
はじめてのSymfony2
 
Bajaj Auto Co Introduction
Bajaj Auto Co IntroductionBajaj Auto Co Introduction
Bajaj Auto Co Introduction
 
Chapter 10 Nervous System I - Basic Structure and Function
Chapter 10   Nervous System I - Basic Structure and FunctionChapter 10   Nervous System I - Basic Structure and Function
Chapter 10 Nervous System I - Basic Structure and Function
 
B2B2Cなヘルスケアサービスの作り方
B2B2Cなヘルスケアサービスの作り方B2B2Cなヘルスケアサービスの作り方
B2B2Cなヘルスケアサービスの作り方
 
Promotion mix of coca cola
Promotion mix of coca colaPromotion mix of coca cola
Promotion mix of coca cola
 
Merger & acquisition with case study
Merger & acquisition with case studyMerger & acquisition with case study
Merger & acquisition with case study
 

Similar to About Haystack

hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用
Toshiaki Baba
 
Nimble storage investor_deck_public
Nimble storage investor_deck_publicNimble storage investor_deck_public
Nimble storage investor_deck_public
Sequoia Capital
 
Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)
MongoSF
 

Similar to About Haystack (9)

hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用
 
SCALE 10x Build a Cloud Day
SCALE 10x Build a Cloud DaySCALE 10x Build a Cloud Day
SCALE 10x Build a Cloud Day
 
Nimble storage investor_deck_public
Nimble storage investor_deck_publicNimble storage investor_deck_public
Nimble storage investor_deck_public
 
Dibi Conference 2012
Dibi Conference 2012Dibi Conference 2012
Dibi Conference 2012
 
DevNation Atlanta
DevNation AtlantaDevNation Atlanta
DevNation Atlanta
 
Novalug 07142012
Novalug 07142012Novalug 07142012
Novalug 07142012
 
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud InfrastructureSCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
 
Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)Implementing MongoDB at Shutterfly (Kenny Gorman)
Implementing MongoDB at Shutterfly (Kenny Gorman)
 
MongoDB开发应用实践
MongoDB开发应用实践MongoDB开发应用实践
MongoDB开发应用实践
 

More from Tomohiro MITSUMUNE (7)

symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクション
 
jQueryチュートリアル
jQueryチュートリアルjQueryチュートリアル
jQueryチュートリアル
 
symfonyイントロダクション
symfonyイントロダクションsymfonyイントロダクション
symfonyイントロダクション
 
macbookについてみんなが誤解していること
macbookについてみんなが誤解していることmacbookについてみんなが誤解していること
macbookについてみんなが誤解していること
 
Linuxにおける開発環境
Linuxにおける開発環境Linuxにおける開発環境
Linuxにおける開発環境
 
15分でわかる分散バージョン管理システムgit
15分でわかる分散バージョン管理システムgit15分でわかる分散バージョン管理システムgit
15分でわかる分散バージョン管理システムgit
 
DOM Scripting ことはじめ
DOM Scripting ことはじめDOM Scripting ことはじめ
DOM Scripting ことはじめ
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

About Haystack