Slide 1

Slide 1 text

MongoDB In The Cloud with Amazon Web Services Michael Fiedler, 10gen https://github.com/miketheman @mikefiedler Tuesday, June 26, 12

Slide 2

Slide 2 text

EC2 EBS MongoDB Tuesday, June 26, 12

Slide 3

Slide 3 text

Agenda • MongoDB & AWS Review • MongoDB Components on AWS • Administration of MongoDB in AWS Tuesday, June 26, 12

Slide 4

Slide 4 text

Tuesday, June 26, 12

Slide 5

Slide 5 text

Shard Server • Disk Speed • Disk Capacity • RAM • CPU High High High Moderate Tuesday, June 26, 12

Slide 6

Slide 6 text

Shard Server in EC2 • MongoDB designed for OS defaults • Don't tweak too much! Tuesday, June 26, 12

Slide 7

Slide 7 text

Shard Server in EC2 • Use 64-bit instance • Use standard virtual memory page size • Raise "nofiles" ulimit • Use RAID10 • Use modern filesystem (ext4, XFS) • Use "noatime" mount option Tuesday, June 26, 12

Slide 8

Slide 8 text

Shard Server in EC2 • Readahead: how much more to read than what you asked for • If set too high, can impact performance • Set to 0 on EBS devices • Set to desired value on RAID device Tuesday, June 26, 12

Slide 9

Slide 9 text

Config Server • Disk Speed • Disk Capacity • RAM • CPU Low Low Moderate Low Tuesday, June 26, 12

Slide 10

Slide 10 text

Config Server in EC2 • Use RAID10 • Use 64-bit instance • Can run on shard servers Tuesday, June 26, 12

Slide 11

Slide 11 text

Arbiter • Disk Speed • Disk Capacity • RAM • CPU Low Low Low Low Tuesday, June 26, 12

Slide 12

Slide 12 text

Arbiter in EC2 • Can use Micro instance • Might make elections slower • Can use instance store • Still want backups! Tuesday, June 26, 12

Slide 13

Slide 13 text

Mongos • Disk Speed • Disk Capacity • RAM • CPU None None Moderate Low Tuesday, June 26, 12

Slide 14

Slide 14 text

Mongos in EC2 • Often run on application servers • 32-bit mongos with 64-bit mongod OK Tuesday, June 26, 12

Slide 15

Slide 15 text

Administration Topics • Deployment Strategy • Networking • Security • Backup Tuesday, June 26, 12

Slide 16

Slide 16 text

High Availability • Always use Replica Sets! • EC2 Availability Zones Tuesday, June 26, 12

Slide 17

Slide 17 text

Disaster Recovery • Always use Replica Sets! • EC2 Regions Tuesday, June 26, 12

Slide 18

Slide 18 text

Networking • Resist the urge to use IP addresses • Instead, use DNS with Route53 • or Chef/Puppet to manage /etc/hosts Tuesday, June 26, 12

Slide 19

Slide 19 text

Security • EC2 Security Groups • Can reference other SGs • mongos, unsharded mongod: 27017 • Shard mongod: 27018 • Config mongod: 27019 Tuesday, June 26, 12

Slide 20

Slide 20 text

Backup • EBS provides point-in-time snapshots • When using RAID, need to: • fsync and lock, or • snapshot journal last • Can snapshot secondaries • Save snapshots to S3 Tuesday, June 26, 12

Slide 21

Slide 21 text

All of the Above http://www.mongodb.org/display/DOCS/ Amazon+EC2 Tuesday, June 26, 12

Slide 22

Slide 22 text

In Retrospect... • This is a lot to cover in ~30 minutes • There is a lot to consider • 10gen is here to help -- use us! • http://groups.google.com/group/mongodb-user • https://www.10gen.com/presentations Tuesday, June 26, 12

Slide 23

Slide 23 text

Questions? Michael Fiedler, 10gen https://github.com/miketheman @mikefiedler Tuesday, June 26, 12