SlideShare a Scribd company logo
Replication and MongoDBDwight Merriman (@dmerr)10gen
BasicsA bit like MySQL replicationAsynchronous master/slaveLet’s try it…
Command Line--master [--oplogSize <MB>]--slave –source <host> [--only <db>]
The local dbDoesn’t replicateOn master:local.oplog.$mainlocal.slavesOn slave:local.sources		> use local		> db.sources.find()
Administration> // master> use local> db.printReplicationInfo()> db.slaves.find()> db.oplog.$main.findOne()// slave> use local> db.printSlaveReplicationInfo()
TopologiesM->SM->S ->S ->SM->SM-/M<->M *very restrictive
Replica Pairs--pairwith
Replica PairsReplica Sets A cluster of N servers
 Any (one) node can be primary
 Consensus election of primary
 Automatic failover
 Automatic recovery
 All writes to primary
 Reads can be to primary or a second
 Rack and data center aware
 ETA: v1.6 July 2010 (“stable”)Replica Sets – Design ConceptsA write is only truly committed once it has replicated to a majority of servers in the set.  (We can wait for confirmation for this though, with getLastError.)Writes which are committed at the master of the set may be visible before the true cluster-wide commit has occurred.  This property, which is more relaxed than some traditional products, makes theoretically achievable performance and availability higher.On a failover, if there is data which has not replicated form the primary, the data is dropped (see #1).
A SetMember 1Member 3Member 2
A SetMember 1Member 3Member 2PRIMARY
A SetMember 1Member 3PRIMARYMember 2DOWN
A SetMember 1Member 3PRIMARYMember 2RECOVER-ING

More Related Content

PDF
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
PDF
MongoDB Database Replication
PDF
uerj201212
PDF
Replication MongoDB Days 2013
ODP
Linux-Fu for PHP Developers
PPT
Replica Sets (NYC NoSQL Meetup)
PDF
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
PDF
HaskellとDebianの辛くて甘い関係
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
MongoDB Database Replication
uerj201212
Replication MongoDB Days 2013
Linux-Fu for PHP Developers
Replica Sets (NYC NoSQL Meetup)
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
HaskellとDebianの辛くて甘い関係

What's hot (20)

PDF
Mongo à la Resque
PDF
ODP
OpenGurukul : Database : PostgreSQL
PDF
MySQL Slow Query log Monitoring using Beats & ELK
PPTX
Replication and Replica Sets
KEY
MongoDB: How it Works
PPTX
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
ODP
Caching and tuning fun for high scalability
PDF
Json perl example
PDF
MyAWR another mysql awr
PDF
groovy databases
PPTX
Config BuildConfig
PDF
How to create a pluggable database by cloning an existing local pdb
PDF
New features in Performance Schema 5.7 in action
PPTX
MySQL Audit using Percona audit plugin and ELK
PPTX
Getting started with replica set in MongoDB
PDF
Introduce leo-redundant-manager
PDF
Cassandra for Python Developers
Mongo à la Resque
OpenGurukul : Database : PostgreSQL
MySQL Slow Query log Monitoring using Beats & ELK
Replication and Replica Sets
MongoDB: How it Works
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
Caching and tuning fun for high scalability
Json perl example
MyAWR another mysql awr
groovy databases
Config BuildConfig
How to create a pluggable database by cloning an existing local pdb
New features in Performance Schema 5.7 in action
MySQL Audit using Percona audit plugin and ELK
Getting started with replica set in MongoDB
Introduce leo-redundant-manager
Cassandra for Python Developers
Ad

Viewers also liked (20)

PPTX
Back to Basics: Build Something Big With MongoDB
PPTX
Advanced Replication
PDF
MongoDB Administration 101
PDF
God is in the details
PDF
MongoDB Replication Cluster
PDF
Новая архитектура шардинга MongoDB, Leif Walsh (Tokutek)
PDF
Setting up mongodb sharded cluster in 30 minutes
PDF
PDF
Spring Data MongoDB Webiner
PDF
Ruby Development and MongoMapper (John Nunemaker)
PDF
MongoHQ (Jason McCay & Ben Wyrosdick)
PPTX
MongoDB on Windows Azure
PDF
MongoDB Shard Cluster
PPTX
Webinar: Replication and Replica Sets
PDF
Setting up mongo replica set
PPT
MongoDB Replica Sets
PDF
Practical Ruby Projects with MongoDB - Ruby Midwest
PDF
Robusta hoi thao ung dung ao hoa trong doanh nghiep - 22.06.2013
KEY
MongoDB - Ruby document store that doesn't rhyme with ouch
PDF
Development to Production with Sharded MongoDB Clusters
Back to Basics: Build Something Big With MongoDB
Advanced Replication
MongoDB Administration 101
God is in the details
MongoDB Replication Cluster
Новая архитектура шардинга MongoDB, Leif Walsh (Tokutek)
Setting up mongodb sharded cluster in 30 minutes
Spring Data MongoDB Webiner
Ruby Development and MongoMapper (John Nunemaker)
MongoHQ (Jason McCay & Ben Wyrosdick)
MongoDB on Windows Azure
MongoDB Shard Cluster
Webinar: Replication and Replica Sets
Setting up mongo replica set
MongoDB Replica Sets
Practical Ruby Projects with MongoDB - Ruby Midwest
Robusta hoi thao ung dung ao hoa trong doanh nghiep - 22.06.2013
MongoDB - Ruby document store that doesn't rhyme with ouch
Development to Production with Sharded MongoDB Clusters
Ad

Similar to MongoDB Replication (Dwight Merriman) (20)

PDF
Mongodb replication
PPTX
Basic Replication in MongoDB
PPTX
Replication and replica sets
PPTX
Replication and Replica Sets
PPTX
Webinar: Replication and Replica Sets
PPTX
Replication and replica sets
PPTX
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
DOCX
MongoDB Replication and Sharding
PPTX
Practical Replication June-2011
PDF
Evolution of MongoDB Replicaset and Its Best Practices
PDF
MongoDb scalability and high availability with Replica-Set
PDF
Evolution Of MongoDB Replicaset
PPTX
Get expertise with mongo db
PDF
Mongodb workshop
PPTX
Replication and Replica Sets
PPTX
Replication and Replica Sets
KEY
Replication, Durability, and Disaster Recovery
PDF
2013 london advanced-replication
PDF
Introduction to Mongodb
ODP
MongoDB: Advance concepts - Replication and Sharding
Mongodb replication
Basic Replication in MongoDB
Replication and replica sets
Replication and Replica Sets
Webinar: Replication and Replica Sets
Replication and replica sets
MongoDB London 2013: Basic Replication in MongoDB presented by Marc Schwering...
MongoDB Replication and Sharding
Practical Replication June-2011
Evolution of MongoDB Replicaset and Its Best Practices
MongoDb scalability and high availability with Replica-Set
Evolution Of MongoDB Replicaset
Get expertise with mongo db
Mongodb workshop
Replication and Replica Sets
Replication and Replica Sets
Replication, Durability, and Disaster Recovery
2013 london advanced-replication
Introduction to Mongodb
MongoDB: Advance concepts - Replication and Sharding

More from MongoSF (18)

PPTX
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
PPTX
Schema design with MongoDB (Dwight Merriman)
KEY
C# Development (Sam Corder)
KEY
Flexible Event Tracking (Paul Gebheim)
KEY
Administration (Eliot Horowitz)
KEY
Administration
KEY
Sharding with MongoDB (Eliot Horowitz)
KEY
Practical Ruby Projects (Alex Sharp)
PDF
Implementing MongoDB at Shutterfly (Kenny Gorman)
PDF
Debugging Ruby (Aman Gupta)
PPTX
Indexing and Query Optimizer (Aaron Staple)
PDF
Zero to Mongo in 60 Hours
KEY
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
KEY
PHP Development with MongoDB (Fitz Agard)
PPT
Java Development with MongoDB (James Williams)
PPTX
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
PPTX
From MySQL to MongoDB at Wordnik (Tony Tam)
PDF
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
Webinar: Typische MongoDB Anwendungsfälle (Common MongoDB Use Cases) 
Schema design with MongoDB (Dwight Merriman)
C# Development (Sam Corder)
Flexible Event Tracking (Paul Gebheim)
Administration (Eliot Horowitz)
Administration
Sharding with MongoDB (Eliot Horowitz)
Practical Ruby Projects (Alex Sharp)
Implementing MongoDB at Shutterfly (Kenny Gorman)
Debugging Ruby (Aman Gupta)
Indexing and Query Optimizer (Aaron Staple)
Zero to Mongo in 60 Hours
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
PHP Development with MongoDB (Fitz Agard)
Java Development with MongoDB (James Williams)
Real time ecommerce analytics with MongoDB at Gilt Groupe (Michael Bryzek & M...
From MySQL to MongoDB at Wordnik (Tony Tam)
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Artificial Intelligence
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Mushroom cultivation and it's methods.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
Tartificialntelligence_presentation.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Artificial Intelligence
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
cloud_computing_Infrastucture_as_cloud_p
Mushroom cultivation and it's methods.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Getting Started with Data Integration: FME Form 101
Heart disease approach using modified random forest and particle swarm optimi...
MIND Revenue Release Quarter 2 2025 Press Release
Assigned Numbers - 2025 - Bluetooth® Document
gpt5_lecture_notes_comprehensive_20250812015547.pdf
TLE Review Electricity (Electricity).pptx
Programs and apps: productivity, graphics, security and other tools

MongoDB Replication (Dwight Merriman)