SlideShare a Scribd company logo
1 of 16
Download to read offline
Data Center Awareness
    Scott Hernandez, 10gen
Agenda
●   Infrastructure
●   Players and moving pieces
●   Goals and challenges
●   MongoDB solutions
    ○ Now (Replication, Sharding, Tagging)
    ○ Future (+=, Shard affinity, more Tagging)
Multiple Online Data Centers
● Europe           ● USA
  ○ App              ○ App
  ○ Data             ○ Data


● Asia
  ○ App
Infrastructure
●   Geographically disparate clients
●   Geo-DNS/Load Balancer (LB)
●   Accelerators/Reverse-Proxies
●   Server/Application
Players Introduction
● Users

● Data Centers
  ○ Application Servers
  ○ Databases


● Application Awareness
  ○ Configuration
  ○ Why?
Goals
● Reduce network
    ○ latency
    ○ Inter-dc traffic
● Localize resource use
    ○ Reduce failure cases
    ○ Increase availability
    ○ Isolate dependencies
●   Provide multiple active sites
●   Partition geo/regional data
Challenges
● Data concistency
    ○ User experience
    ○ Backup and operational needs
● Scaling
● Partitioning/Sharding
Multiple Online Data Centers
● Europe           ● USA
  ○ App              ○ App
  ○ Data             ○ Data


● Asia
  ○ App
Non-default behaviors
Default:               Multi-DC needs:
● Primary read/write   ● Read locally
● No stale reads       ● Support some stale
                         reads
Replication
● Replica Sets
  ○ Possible to read from non-primary replicas
  ○ Copy of data
  ○ Write Concern
    ■ Tagging
    ■ Verifiable writes


● Provides
  ○ Isolation (possible stale reads)
  ○ Availability
  ○ Distribution of read, possibly stale (WriteConcern)
Replica Writes

Client   Write   Replica_Safe

                                   USA-NY

         Ack


                                            USA-CA




                           Query
                                   EUROPE
                 Client
Tagged Writes
Uses
● Multiple Racks/DCs
● Backups
● Disaster Recovery
Sharding + Replication
● Range-based sharding (chunks)
  ○ Not tag aware
  ○ Random distribution (balancer)
● Shards made up of Replica Sets
  ○ All advantages
● Writes to (primary) shard per chunk
● Reads
  ○ From Primary by default
  ○ Optional non-primary reads
New Features
● ReadPreference
  ○   Primary (only)
  ○   Secondary (preferred)
  ○   PrimaryFirst?
  ○   SecondayOnly?
  ○   Any (closest)


● Replica Sets
  ○ ReadPreference
● Sharding
  ○ Tagged balancing
  ○ ReadPreference
Sharding - Reads
● Local when non-primary
● Tagged
  ○ Custom Tagging
  ○ By region/dc/rack?
Sharding - Balancing/Distribution
● Tag chunks/ranges
● Possible super-chunks (grouping)

More Related Content

What's hot

Sql server JOIN
Sql server JOINSql server JOIN
Sql server JOIN
Riteshkiit
 

What's hot (20)

Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)
 
Xml dom
Xml domXml dom
Xml dom
 
XML
XMLXML
XML
 
Intro to XML in libraries
Intro to XML in librariesIntro to XML in libraries
Intro to XML in libraries
 
Storage in hadoop
Storage in hadoopStorage in hadoop
Storage in hadoop
 
20120606 Lazy Programmers Write Self-Modifying Code /or/ Dealing with XML Ord...
20120606 Lazy Programmers Write Self-Modifying Code /or/ Dealing with XML Ord...20120606 Lazy Programmers Write Self-Modifying Code /or/ Dealing with XML Ord...
20120606 Lazy Programmers Write Self-Modifying Code /or/ Dealing with XML Ord...
 
OldSQL to NewSQL
OldSQL to NewSQL OldSQL to NewSQL
OldSQL to NewSQL
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDBThe Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDB
 
Xml
XmlXml
Xml
 
Xml databases
Xml databasesXml databases
Xml databases
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
Using database object relational storage
Using database object relational storageUsing database object relational storage
Using database object relational storage
 
No sql
No sqlNo sql
No sql
 
Training Slides: Basics 101: Introduction to Tungsten Replicator
Training Slides: Basics 101: Introduction to Tungsten ReplicatorTraining Slides: Basics 101: Introduction to Tungsten Replicator
Training Slides: Basics 101: Introduction to Tungsten Replicator
 
Data cache management in php
Data cache management in phpData cache management in php
Data cache management in php
 
Sql server 2
Sql server 2Sql server 2
Sql server 2
 
Sql server JOIN
Sql server JOINSql server JOIN
Sql server JOIN
 
Advanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL ServerAdvanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL Server
 
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQLFirst steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
 
11 wordprocessing ml subject - glossary document
11   wordprocessing ml subject - glossary document11   wordprocessing ml subject - glossary document
11 wordprocessing ml subject - glossary document
 

Similar to MongoDB Datacenter Awareness (mongosf2012)

DAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
DAX: A Widely Distributed Multi-tenant Storage Service for DBMS HostingDAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
DAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
Rui Liu
 
Hadoop and cassandra
Hadoop and cassandraHadoop and cassandra
Hadoop and cassandra
Christina Yu
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
DoKC
 

Similar to MongoDB Datacenter Awareness (mongosf2012) (20)

NUMA and Java Databases
NUMA and Java DatabasesNUMA and Java Databases
NUMA and Java Databases
 
Scalable distributed stream_processing
Scalable distributed stream_processingScalable distributed stream_processing
Scalable distributed stream_processing
 
Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)Caching in (DevoxxUK 2013)
Caching in (DevoxxUK 2013)
 
SNIA SDC 2016 final
SNIA SDC 2016 finalSNIA SDC 2016 final
SNIA SDC 2016 final
 
DAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
DAX: A Widely Distributed Multi-tenant Storage Service for DBMS HostingDAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
DAX: A Widely Distributed Multi-tenant Storage Service for DBMS Hosting
 
Real-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerReal-time analytics with Druid at Appsflyer
Real-time analytics with Druid at Appsflyer
 
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
PGConf APAC 2018 - High performance json  postgre-sql vs. mongodbPGConf APAC 2018 - High performance json  postgre-sql vs. mongodb
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
Hadoop and cassandra
Hadoop and cassandraHadoop and cassandra
Hadoop and cassandra
 
Mongo nyc nyt + mongodb
Mongo nyc nyt + mongodbMongo nyc nyt + mongodb
Mongo nyc nyt + mongodb
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
 
Linux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and OpportunitiesLinux NUMA & Databases: Perils and Opportunities
Linux NUMA & Databases: Perils and Opportunities
 
The Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesThe Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization Opportunities
 
Kraken mesoscon 2018
Kraken mesoscon 2018Kraken mesoscon 2018
Kraken mesoscon 2018
 
An Introduction to Apache Cassandra
An Introduction to Apache CassandraAn Introduction to Apache Cassandra
An Introduction to Apache Cassandra
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
 
When is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar SeriesWhen is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar Series
 
Data Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet ReaderData Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet Reader
 
Caching in
Caching inCaching in
Caching in
 
Mongodb meetup
Mongodb meetupMongodb meetup
Mongodb meetup
 

More from Scott Hernandez

Mongo sf easy java persistence
Mongo sf   easy java persistenceMongo sf   easy java persistence
Mongo sf easy java persistence
Scott Hernandez
 
MongoDB Aug2010 SF Meetup
MongoDB Aug2010 SF MeetupMongoDB Aug2010 SF Meetup
MongoDB Aug2010 SF Meetup
Scott Hernandez
 
MongoDB: tips, trick and hacks
MongoDB: tips, trick and hacksMongoDB: tips, trick and hacks
MongoDB: tips, trick and hacks
Scott Hernandez
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
Scott Hernandez
 
Java Development with MongoDB
Java Development with MongoDBJava Development with MongoDB
Java Development with MongoDB
Scott Hernandez
 

More from Scott Hernandez (14)

MongoDB 2.8 Replication Internals: Fitting it all together
MongoDB 2.8 Replication Internals: Fitting it all togetherMongoDB 2.8 Replication Internals: Fitting it all together
MongoDB 2.8 Replication Internals: Fitting it all together
 
Advanced Replication Internals
Advanced Replication InternalsAdvanced Replication Internals
Advanced Replication Internals
 
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)
 
MongoDB Operational Best Practices (mongosf2012)
MongoDB Operational Best Practices (mongosf2012)MongoDB Operational Best Practices (mongosf2012)
MongoDB Operational Best Practices (mongosf2012)
 
Mongo sf easy java persistence
Mongo sf   easy java persistenceMongo sf   easy java persistence
Mongo sf easy java persistence
 
MongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with MorphiaMongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with Morphia
 
MongoDB: Mastering the shell
MongoDB: Mastering the shellMongoDB: Mastering the shell
MongoDB: Mastering the shell
 
MongoDB: Backup, Restore, and DR
MongoDB: Backup, Restore, and DRMongoDB: Backup, Restore, and DR
MongoDB: Backup, Restore, and DR
 
A Brief MongoDB Intro
A Brief MongoDB IntroA Brief MongoDB Intro
A Brief MongoDB Intro
 
What's new in the MongoDB Java Driver (2.5)?
What's new in the MongoDB Java Driver (2.5)?What's new in the MongoDB Java Driver (2.5)?
What's new in the MongoDB Java Driver (2.5)?
 
MongoDB Aug2010 SF Meetup
MongoDB Aug2010 SF MeetupMongoDB Aug2010 SF Meetup
MongoDB Aug2010 SF Meetup
 
MongoDB: tips, trick and hacks
MongoDB: tips, trick and hacksMongoDB: tips, trick and hacks
MongoDB: tips, trick and hacks
 
Mastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript ShellMastering the MongoDB Javascript Shell
Mastering the MongoDB Javascript Shell
 
Java Development with MongoDB
Java Development with MongoDBJava Development with MongoDB
Java Development with MongoDB
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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...
 
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, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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 New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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 Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
"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 ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
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
 

MongoDB Datacenter Awareness (mongosf2012)

  • 1. Data Center Awareness Scott Hernandez, 10gen
  • 2. Agenda ● Infrastructure ● Players and moving pieces ● Goals and challenges ● MongoDB solutions ○ Now (Replication, Sharding, Tagging) ○ Future (+=, Shard affinity, more Tagging)
  • 3. Multiple Online Data Centers ● Europe ● USA ○ App ○ App ○ Data ○ Data ● Asia ○ App
  • 4. Infrastructure ● Geographically disparate clients ● Geo-DNS/Load Balancer (LB) ● Accelerators/Reverse-Proxies ● Server/Application
  • 5. Players Introduction ● Users ● Data Centers ○ Application Servers ○ Databases ● Application Awareness ○ Configuration ○ Why?
  • 6. Goals ● Reduce network ○ latency ○ Inter-dc traffic ● Localize resource use ○ Reduce failure cases ○ Increase availability ○ Isolate dependencies ● Provide multiple active sites ● Partition geo/regional data
  • 7. Challenges ● Data concistency ○ User experience ○ Backup and operational needs ● Scaling ● Partitioning/Sharding
  • 8. Multiple Online Data Centers ● Europe ● USA ○ App ○ App ○ Data ○ Data ● Asia ○ App
  • 9. Non-default behaviors Default: Multi-DC needs: ● Primary read/write ● Read locally ● No stale reads ● Support some stale reads
  • 10. Replication ● Replica Sets ○ Possible to read from non-primary replicas ○ Copy of data ○ Write Concern ■ Tagging ■ Verifiable writes ● Provides ○ Isolation (possible stale reads) ○ Availability ○ Distribution of read, possibly stale (WriteConcern)
  • 11. Replica Writes Client Write Replica_Safe USA-NY Ack USA-CA Query EUROPE Client
  • 12. Tagged Writes Uses ● Multiple Racks/DCs ● Backups ● Disaster Recovery
  • 13. Sharding + Replication ● Range-based sharding (chunks) ○ Not tag aware ○ Random distribution (balancer) ● Shards made up of Replica Sets ○ All advantages ● Writes to (primary) shard per chunk ● Reads ○ From Primary by default ○ Optional non-primary reads
  • 14. New Features ● ReadPreference ○ Primary (only) ○ Secondary (preferred) ○ PrimaryFirst? ○ SecondayOnly? ○ Any (closest) ● Replica Sets ○ ReadPreference ● Sharding ○ Tagged balancing ○ ReadPreference
  • 15. Sharding - Reads ● Local when non-primary ● Tagged ○ Custom Tagging ○ By region/dc/rack?
  • 16. Sharding - Balancing/Distribution ● Tag chunks/ranges ● Possible super-chunks (grouping)