Professional Documents
Culture Documents
Everything is Done
Types of outage
Planned
Hardware upgrade O/S or le-system tuning Relocation of data to new le-system / storage Software upgrade Hardware failure Data center failure Region outage Human error Application corruption
Unplanned
Replication features
A cluster of N servers Any single node can be primary Consensus election of primary Automatic failover Automatic recovery All writes to primary Reads can be to primary (default) or a secondary
Member 2
Member 2 PRIMARY
Member 2 DOWN
Member 3 PRIMARY
Member 2 DOWN
Member 3 PRIMARY
RECOVERING
Member 2
Automatic recovery
Member 3 PRIMARY
Member 2
Typical Congurations
Typical Congurations
Typical Congurations
Typical Congurations
Replica Set
Typical Congurations
Replica Set
Typical Congurations
Replica Set
Typical Congurations
Replica Set
Typical Congurations
Replica Set London San Francisco New York
Typical Congurations
Replica Set London San Francisco New York
Hardware Sizing
Collection 1
Index 1
Collection 1
Index 1
Collection 1
Index 1
Collection 1
Index 1
Collection 1
Index 1
Collection 1
Disk
Index 1
Collection 1
Disk
Index 1
Collection 1
Disk
Index 1
= =
100 ns 10,000 ns
Disk congurations
Single Disk
~200 seeks / second
Disk congurations
Single Disk
~200 seeks / second
RAID 0
Disk congurations
Single Disk
~200 seeks / second
RAID 0
RAID 10
SSD?
Seek time of 0.1ms vs 5ms
(200 seeks / sec => 10000 seeks / sec)
But expensive
Key Points
Know how important page faults are If you want low latency, avoid page faults Size memory appropriately To avoid page faults, t everything in RAM Collection Data + Index Data Provision disk appropriately RAID10 is recommended SSDs are fast, if you can afford them
Monitoring Tools
mongostat -
Load Testing!
Understand what you think the system should do
Load and test your hypothesis Use the DB profiler Use a trending monitoring tool to analyze MMS, munin, etc.
Backups!
mongodump versus snapshot
Have a Operations handbook Practice basic procedures backup & restore failing over node rolling upgrade
download at mongodb.org
alvin@10gen.com
http://bit.ly/mongoN
http://linkd.in/joinmongo