failover • App-level definition of “write replication” • Secondary nodes can replicate with a slaveDelay • Secondary nodes can be hidden • Maximum of 12 nodes, with 7 voting Friday 23 November 12
options) • Meta Data for shard stored in ConfigDB • Copy of meta data stored in-memory by mongos • Config DB cluster is *not* a replica set • Data split into chunks, using range based shard key • Chunks may be migrated between shards • New chunks created by “splitting” old chunks Friday 23 November 12
defaults on 64 bit instance • Use standard virtual memory page size • Raise “nofiles” ulimit • Use RAID10 & modern f/s -> ext4, xfs etc • Use “noatime” mount option Friday 23 November 12
•Readahead: how much more to read than what you asked for • If too high => possible performance impact • Set to 0 on EBS devices • Set to desired value on RAID device Friday 23 November 12
recommended • Primary/Secondary should be equal* • High CPU is not necessary • High Memory for large mongod instances • Network capacity is also IO capacity • EBS Friday 23 November 12
m1.large to m2.xlarge = 2x Mem, 0.5x Network • Do not use micro except for testing • m1.medium is usually sufficient for config DB • m1.small can be used for Arbiters Friday 23 November 12
descriptor limits (20,000 or above) • Turn off atime on filesystem (pre-2.6.30 especially) • Use ext4/XFS as the filesystem (not ext3) • RAID 10 is recommended everywhere • mitigates slow EBS volumes (fail the bad volume) • Do not use large VM pages • Do configure swap to prevent OOM Killer Friday 23 November 12
possible, single EBS volume, hidden slave can be used to simplify • Single EBS volume, with journaling means: • No fsync & lock required • Similar applies to LVM snapshots • http://www.mongodb.org/pages/viewpage.action? pageId=19562846 Friday 23 November 12
- leave readahead as-is • On data volume, lower readahead to a reasonable level (mongod must be restarted) • Each EBS volume is ~100 IOPS • Use MMS and munin-node to track IO over time • Also track Flush average • Fragmentation can cause operations to be expensive • Trade-offs for using compact and repair Friday 23 November 12