SlideShare a Scribd company logo
1 of 20
Mechanism
Presented By : Dhruv Patel
Introduction
• 1.15 billion monthly active users .
• 2.5 billion content items shared per day (status updates + wall posts +
photos + videos + comments)
• 2.7 billion Likes per day
• 300 million photos uploaded per day
• 500+terabytes of new data ingested into the databases every day
By this statics, Facebook have to use such a great technology to handle
this traffic and giving their user a faster and safer social experience
Technologies
For faster data transfer
• Cookies and Caches
• GZip compression
• AJAX and JSON
• XMPP messaging
For data storage
• HBase & Haystack
• Zookeeper
• Memcached
• Scribe
Cookies and Caches
Cookies are small pieces of data that are stored on your
computer, mobile phone or other device.
Cache is a type of memory which is used by web browser. When any
page loads and it is not changeable for a long time browser cache it’s
CSS/JS and read it from memory to reduce the data transfer .
It provide and understand a range of products and services.
Facebook use this technologies to do things like:
• make Facebook easier or faster to use;
• enable features and store information about you (including on your
device or in your browser cache) and your use of Facebook;
• deliver, understand and improve advertising;
• monitor and understand the use of FB products and services;
• to protect you, others and Facebook.
Cookies and Caches
Gzip Compression
Gzip is a software application used for file compression and
decompression
It compresses the image, CSS, JS sent by server and loads in client
machine then decompress it. So there is no change in data and UI but
data transfer rate is decreased. So all servers of Facebook used Gzip
compression to make web more faster
AJAX and JSON
AJAX and JSON is a group of interrelated web development techniques
used on the client-side to create asynchronous web applications.
With AJAX, web applications can send data to, and retrieve data
from, a server asynchronously (in the background) without interfering
with the display and behavior of the existing page.
Data can be retrieved using the XMlHttpRequest object.
Where AJAX-JSON mainly used in Facebook
• Like, Comment, Share
• Post story
• Send message
• Load feed
• Dialog Box – likes, Mutual friends etc…
AJAX and JSON
XMPP Messaging
XMPP stands for Extensible Messaging and Presence Protocol.
XMPP is also called jabber protocol.
Facebook chat and messages work on this platform.
Every user of Facebook has a unique id and personal chat email like
100000874067290@chat.facebook.com and someone wants to send
message to that user core script convert it to XML and send to Jabber
server.
After this process partner user gets the message at same instance due
to highly reliable servers.
XMPP Messaging
Manage data in large clusters
HBase and Haystack
HDFS ( Highly Distributed File System )
• HBase & HDFS are elastic by design
• Multiple table shards (regions) per physical server
• On node additions
• Load balancer automatically reassigns shards from overloaded
nodes to new nodes
• Because file system underneath is itself distributed, data for
reassigned regions is instantly servable from the new nodes.
• Regions can be dynamically split into smaller regions.
• Pre-sharding is not necessary
• Splits are near instantaneous!
HBase and Haystack
Automatic failover
• Node failures automatically detected by HBase Master
• Regions on failed node are distributed evenly among surviving
nodes.
• Multiple regions/server model avoids need for substantial
overprovisioning
• HBase Master failover
• 1 active, rest standby
• When active master fails, a standby automatically takes over
HBase and Haystack
Zookeeper
Zookeeper is open source software that FB use mainly for two purposes:
• As the controller for implementing sharding and failover of
application servers
• As a store for their discovery service.
Since Zookeeper provides FB with a highly available repository and
notification mechanism, it goes a long way towards helping FB build a
highly available service.
Memcached
If you've read anything about scaling large websites, you've probably
heard about memcached.
Memcached is a high-performance, distributed memory object
caching system.
It speeding up Facebook by alleviating database load.
Memcached is an in-memory key-value store for small chunks of
arbitrary data (strings, objects) from results of database calls, API calls, or
page rendering.
Facebook is the world's largest user of memcached. They use
memcached to alleviate database load.
Scribe – Log server
Scribe was developed at Facebook using Apache Thrift and released in
2008 as open source.
Scribe is a server for aggregating log data streamed in real-time from a
large number of servers. It is designed to be scalable, extensible without
client-side modification, and robust to failure of the network or any
specific machine.
Desktop site
Mobile site
Application
Legacy
SMS/Email
Scribe
Scribe
Scribe
Scribe – Log server
References
• Facebook.com/engineering
• Facebook.com/data
• Developers.facebook.com
• Newsroom.fb.com
• Hbase.apache.org
• Zookeeper.apache.org
Thank you!

More Related Content

What's hot

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewPierre Baillet
 
How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013Dipti Borkar
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBAmar Das
 
How companies use NoSQL and Couchbase - NoSQL Now 2013
How companies use NoSQL and Couchbase - NoSQL Now 2013How companies use NoSQL and Couchbase - NoSQL Now 2013
How companies use NoSQL and Couchbase - NoSQL Now 2013Dipti Borkar
 
Spark Streaming & Kafka-The Future of Stream Processing
Spark Streaming & Kafka-The Future of Stream ProcessingSpark Streaming & Kafka-The Future of Stream Processing
Spark Streaming & Kafka-The Future of Stream ProcessingJack Gudenkauf
 
Find a needle in Haystack: Facebook's storage system
Find a needle in Haystack: Facebook's storage systemFind a needle in Haystack: Facebook's storage system
Find a needle in Haystack: Facebook's storage systemLIN Yi
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...MongoDB
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremRahul Jain
 
How companies use NoSQL and Couchbase
How companies use NoSQL and CouchbaseHow companies use NoSQL and Couchbase
How companies use NoSQL and CouchbaseDipti Borkar
 
How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014Dipti Borkar
 
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
 
Big Data on the Microsoft Platform
Big Data on the Microsoft PlatformBig Data on the Microsoft Platform
Big Data on the Microsoft PlatformAndrew Brust
 
Intoduction of FIrebase Realtime Database
Intoduction of FIrebase Realtime DatabaseIntoduction of FIrebase Realtime Database
Intoduction of FIrebase Realtime DatabaseSahil Maiyani
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012Andrew Brust
 
Capacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterCapacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterMongoDB
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveIBM Cloud Data Services
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Marina Peregud
 

What's hot (20)

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDB
 
How companies use NoSQL and Couchbase - NoSQL Now 2013
How companies use NoSQL and Couchbase - NoSQL Now 2013How companies use NoSQL and Couchbase - NoSQL Now 2013
How companies use NoSQL and Couchbase - NoSQL Now 2013
 
Spark Streaming & Kafka-The Future of Stream Processing
Spark Streaming & Kafka-The Future of Stream ProcessingSpark Streaming & Kafka-The Future of Stream Processing
Spark Streaming & Kafka-The Future of Stream Processing
 
Find a needle in Haystack: Facebook's storage system
Find a needle in Haystack: Facebook's storage systemFind a needle in Haystack: Facebook's storage system
Find a needle in Haystack: Facebook's storage system
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP Theorem
 
How companies use NoSQL and Couchbase
How companies use NoSQL and CouchbaseHow companies use NoSQL and Couchbase
How companies use NoSQL and Couchbase
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014How companies use NoSQL & Couchbase - NoSQL Now 2014
How companies use NoSQL & Couchbase - NoSQL Now 2014
 
Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]Facebook[The Nuts and Bolts Technology]
Facebook[The Nuts and Bolts Technology]
 
Big Data on the Microsoft Platform
Big Data on the Microsoft PlatformBig Data on the Microsoft Platform
Big Data on the Microsoft Platform
 
Intoduction of FIrebase Realtime Database
Intoduction of FIrebase Realtime DatabaseIntoduction of FIrebase Realtime Database
Intoduction of FIrebase Realtime Database
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Scalable Web Architecture
Scalable Web ArchitectureScalable Web Architecture
Scalable Web Architecture
 
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
Microsoft's Big Play for Big Data- Visual Studio Live! NY 2012
 
Capacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB ClusterCapacity Planning For Your Growing MongoDB Cluster
Capacity Planning For Your Growing MongoDB Cluster
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
 

Similar to How Facebook actually works????

Presention on Facebook in f Distributed systems
Presention on Facebook in f Distributed systemsPresention on Facebook in f Distributed systems
Presention on Facebook in f Distributed systemsAhmad Yar
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.Rishikese MR
 
How facebook works and function- a complete approach
How facebook works and function- a complete approachHow facebook works and function- a complete approach
How facebook works and function- a complete approachPrakhar Gethe
 
Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesUlrich Krause
 
Rapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerRapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerNuwan Bandara
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applicationsEugene Lazutkin
 
Facebook Hadoop Usecase
Facebook Hadoop UsecaseFacebook Hadoop Usecase
Facebook Hadoop Usecasepuneet2k5
 
Going Mobile with HTML5
Going Mobile with HTML5Going Mobile with HTML5
Going Mobile with HTML5John Reiser
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedarya krazydude
 
Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionNguyen Tung
 
System design for video streaming service
System design for video streaming serviceSystem design for video streaming service
System design for video streaming serviceNirmik Kale
 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...Sencha
 
Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Kallex
 
Data infrastructure at Facebook
Data infrastructure at Facebook Data infrastructure at Facebook
Data infrastructure at Facebook AhmedDoukh
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010Membase
 
Tech for the Non Technical - Anatomy of an Application Stack
Tech for the Non Technical - Anatomy of an Application StackTech for the Non Technical - Anatomy of an Application Stack
Tech for the Non Technical - Anatomy of an Application StackIntelligent_ly
 

Similar to How Facebook actually works???? (20)

Presention on Facebook in f Distributed systems
Presention on Facebook in f Distributed systemsPresention on Facebook in f Distributed systems
Presention on Facebook in f Distributed systems
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
 
How facebook works and function- a complete approach
How facebook works and function- a complete approachHow facebook works and function- a complete approach
How facebook works and function- a complete approach
 
Life In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPagesLife In The FastLane: Full Speed XPages
Life In The FastLane: Full Speed XPages
 
Rapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerRapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup Server
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
 
Facebook Hadoop Usecase
Facebook Hadoop UsecaseFacebook Hadoop Usecase
Facebook Hadoop Usecase
 
Going Mobile with HTML5
Going Mobile with HTML5Going Mobile with HTML5
Going Mobile with HTML5
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Data Base Connector
Data Base Connector Data Base Connector
Data Base Connector
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be used
 
Architecture Patterns - Open Discussion
Architecture Patterns - Open DiscussionArchitecture Patterns - Open Discussion
Architecture Patterns - Open Discussion
 
Mysql wp memcached
Mysql wp memcachedMysql wp memcached
Mysql wp memcached
 
System design for video streaming service
System design for video streaming serviceSystem design for video streaming service
System design for video streaming service
 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
 
Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014
 
Data infrastructure at Facebook
Data infrastructure at Facebook Data infrastructure at Facebook
Data infrastructure at Facebook
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010
 
Tech for the Non Technical - Anatomy of an Application Stack
Tech for the Non Technical - Anatomy of an Application StackTech for the Non Technical - Anatomy of an Application Stack
Tech for the Non Technical - Anatomy of an Application Stack
 

More from Dhruv Patel

Shortify for Android
Shortify for AndroidShortify for Android
Shortify for AndroidDhruv Patel
 
Basics of Wordpress
Basics of WordpressBasics of Wordpress
Basics of WordpressDhruv Patel
 
Near field communication - Data transmission
Near field communication - Data transmissionNear field communication - Data transmission
Near field communication - Data transmissionDhruv Patel
 
Modem technology
Modem technologyModem technology
Modem technologyDhruv Patel
 
Inside google search - how it works??
Inside google search - how it works??Inside google search - how it works??
Inside google search - how it works??Dhruv Patel
 
Blue brain project
Blue brain projectBlue brain project
Blue brain projectDhruv Patel
 
Apple iOS - A modern way to mobile operating system
Apple iOS - A modern way to mobile operating systemApple iOS - A modern way to mobile operating system
Apple iOS - A modern way to mobile operating systemDhruv Patel
 

More from Dhruv Patel (8)

Shortify for Android
Shortify for AndroidShortify for Android
Shortify for Android
 
Basics of Wordpress
Basics of WordpressBasics of Wordpress
Basics of Wordpress
 
Near field communication - Data transmission
Near field communication - Data transmissionNear field communication - Data transmission
Near field communication - Data transmission
 
Modem technology
Modem technologyModem technology
Modem technology
 
Inside google search - how it works??
Inside google search - how it works??Inside google search - how it works??
Inside google search - how it works??
 
Google glass
Google glassGoogle glass
Google glass
 
Blue brain project
Blue brain projectBlue brain project
Blue brain project
 
Apple iOS - A modern way to mobile operating system
Apple iOS - A modern way to mobile operating systemApple iOS - A modern way to mobile operating system
Apple iOS - A modern way to mobile operating system
 

Recently uploaded

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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
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
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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.
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

How Facebook actually works????

  • 2. Introduction • 1.15 billion monthly active users . • 2.5 billion content items shared per day (status updates + wall posts + photos + videos + comments) • 2.7 billion Likes per day • 300 million photos uploaded per day • 500+terabytes of new data ingested into the databases every day By this statics, Facebook have to use such a great technology to handle this traffic and giving their user a faster and safer social experience
  • 3. Technologies For faster data transfer • Cookies and Caches • GZip compression • AJAX and JSON • XMPP messaging For data storage • HBase & Haystack • Zookeeper • Memcached • Scribe
  • 4. Cookies and Caches Cookies are small pieces of data that are stored on your computer, mobile phone or other device. Cache is a type of memory which is used by web browser. When any page loads and it is not changeable for a long time browser cache it’s CSS/JS and read it from memory to reduce the data transfer . It provide and understand a range of products and services. Facebook use this technologies to do things like: • make Facebook easier or faster to use; • enable features and store information about you (including on your device or in your browser cache) and your use of Facebook; • deliver, understand and improve advertising; • monitor and understand the use of FB products and services; • to protect you, others and Facebook.
  • 6. Gzip Compression Gzip is a software application used for file compression and decompression It compresses the image, CSS, JS sent by server and loads in client machine then decompress it. So there is no change in data and UI but data transfer rate is decreased. So all servers of Facebook used Gzip compression to make web more faster
  • 7. AJAX and JSON AJAX and JSON is a group of interrelated web development techniques used on the client-side to create asynchronous web applications. With AJAX, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMlHttpRequest object. Where AJAX-JSON mainly used in Facebook • Like, Comment, Share • Post story • Send message • Load feed • Dialog Box – likes, Mutual friends etc…
  • 9. XMPP Messaging XMPP stands for Extensible Messaging and Presence Protocol. XMPP is also called jabber protocol. Facebook chat and messages work on this platform. Every user of Facebook has a unique id and personal chat email like 100000874067290@chat.facebook.com and someone wants to send message to that user core script convert it to XML and send to Jabber server. After this process partner user gets the message at same instance due to highly reliable servers.
  • 11. Manage data in large clusters
  • 12. HBase and Haystack HDFS ( Highly Distributed File System ) • HBase & HDFS are elastic by design • Multiple table shards (regions) per physical server • On node additions • Load balancer automatically reassigns shards from overloaded nodes to new nodes • Because file system underneath is itself distributed, data for reassigned regions is instantly servable from the new nodes. • Regions can be dynamically split into smaller regions. • Pre-sharding is not necessary • Splits are near instantaneous!
  • 13. HBase and Haystack Automatic failover • Node failures automatically detected by HBase Master • Regions on failed node are distributed evenly among surviving nodes. • Multiple regions/server model avoids need for substantial overprovisioning • HBase Master failover • 1 active, rest standby • When active master fails, a standby automatically takes over
  • 15. Zookeeper Zookeeper is open source software that FB use mainly for two purposes: • As the controller for implementing sharding and failover of application servers • As a store for their discovery service. Since Zookeeper provides FB with a highly available repository and notification mechanism, it goes a long way towards helping FB build a highly available service.
  • 16. Memcached If you've read anything about scaling large websites, you've probably heard about memcached. Memcached is a high-performance, distributed memory object caching system. It speeding up Facebook by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. Facebook is the world's largest user of memcached. They use memcached to alleviate database load.
  • 17. Scribe – Log server Scribe was developed at Facebook using Apache Thrift and released in 2008 as open source. Scribe is a server for aggregating log data streamed in real-time from a large number of servers. It is designed to be scalable, extensible without client-side modification, and robust to failure of the network or any specific machine. Desktop site Mobile site Application Legacy SMS/Email Scribe Scribe Scribe
  • 18. Scribe – Log server
  • 19. References • Facebook.com/engineering • Facebook.com/data • Developers.facebook.com • Newsroom.fb.com • Hbase.apache.org • Zookeeper.apache.org