Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MongoDB in the Cloud - Amazon Web Services

MongoDB in the Cloud - Amazon Web Services

Presented at MongoDC 2012

Mike Fiedler

June 26, 2012
Tweet

More Decks by Mike Fiedler

Other Decks in Technology

Transcript

  1. MongoDB In The Cloud with Amazon Web Services Michael Fiedler,

    10gen https://github.com/miketheman @mikefiedler Tuesday, June 26, 12
  2. Agenda • MongoDB & AWS Review • MongoDB Components on

    AWS • Administration of MongoDB in AWS Tuesday, June 26, 12
  3. Shard Server • Disk Speed • Disk Capacity • RAM

    • CPU High High High Moderate Tuesday, June 26, 12
  4. Shard Server in EC2 • MongoDB designed for OS defaults

    • Don't tweak too much! Tuesday, June 26, 12
  5. 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
  6. 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
  7. Config Server • Disk Speed • Disk Capacity • RAM

    • CPU Low Low Moderate Low Tuesday, June 26, 12
  8. Config Server in EC2 • Use RAID10 • Use 64-bit

    instance • Can run on shard servers Tuesday, June 26, 12
  9. Arbiter • Disk Speed • Disk Capacity • RAM •

    CPU Low Low Low Low Tuesday, June 26, 12
  10. Arbiter in EC2 • Can use Micro instance • Might

    make elections slower • Can use instance store • Still want backups! Tuesday, June 26, 12
  11. Mongos • Disk Speed • Disk Capacity • RAM •

    CPU None None Moderate Low Tuesday, June 26, 12
  12. Mongos in EC2 • Often run on application servers •

    32-bit mongos with 64-bit mongod OK Tuesday, June 26, 12
  13. Networking • Resist the urge to use IP addresses •

    Instead, use DNS with Route53 • or Chef/Puppet to manage /etc/hosts Tuesday, June 26, 12
  14. Security • EC2 Security Groups • Can reference other SGs

    • mongos, unsharded mongod: 27017 • Shard mongod: 27018 • Config mongod: 27019 Tuesday, June 26, 12
  15. 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
  16. 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