22
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Maximizing MongoDB Performance on AWS

Maximizing MongoDB Performance on AWS

  • Upload
    mongodb

  • View
    102

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Maximizing MongoDB Performance on AWS

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Maximizing MongoDB Performance on AWS

Page 2: Maximizing MongoDB Performance on AWS

Approaches to running your MongoDB deployment in AWS

• Manage everything yourself. Things to consider:

• Storage/Disk• Networking• Instance Size (Memory &

CPU)

• Rely on a “MongoDB” service with best practices built in.

Page 3: Maximizing MongoDB Performance on AWS

Storage

Page 4: Maximizing MongoDB Performance on AWS

Storage Recommendations

• Databases require fast storage

• Amazon EBS: persistent block level storage to associate with Amazon EC2 instances

• Instance store: storage volumes that directly attach to Amazon EC2 hardware for temporary storage

Page 5: Maximizing MongoDB Performance on AWS

Storage Recommendations

• We recommend Amazon EBS for Amazon EC2 for MongoDB

• Configured IOPS (PIOPS) for IOPS guarantee

• Amazon EBS-optimized instance types (C4, M4, D2, etc) provide dedicated throughput between Amazon EC2 & Amazon EBS

• Improves performance by minimizing contention from other traffic to your instances with regards to Amazon EBS I/O traffic

Page 6: Maximizing MongoDB Performance on AWS

Storage Recommendations

• We recommend dedicating 3 separate volumes for MongoDB, each with their own IOPS due to differing workloads. For example:

• /data (1000 IOPS)• /journal (250 IOPS)• /log (100 IOPS)

Page 7: Maximizing MongoDB Performance on AWS

Storage Recommendations

• Consider throughput for storage performance

• AWS is fairly generous • Of this writing, the maximums for AWS

throughput are:• Max. throughput/Volume is 320 MiB/s• Max. throughput/Instance is 800 MiB/s• For better throughput, shard

Page 8: Maximizing MongoDB Performance on AWS

Storage Recommendations

• RAID 10 provides data reliability by mirroring data on secondary drives (RAID 1) and stripes data across drives (RAID 0)

• Ensure that your total throughput of the combined RAIDed volumes does not exceed the maximum instance throughput

Page 9: Maximizing MongoDB Performance on AWS

Networking

Page 10: Maximizing MongoDB Performance on AWS

Networking Recommendations

• Amazon EC2 Enhanced Networking can provide significantly improved performance & consistency

Page 11: Maximizing MongoDB Performance on AWS

Networking Recommendations

• Configure Amazon VPCs for MongoDB. Amazon Virtual Private Cloud allows you to provision a private, isolated section in AWS where you can define your own IP address, subnets, route tables, and gateways. 

• Use Managed NAT Gateway service

Page 12: Maximizing MongoDB Performance on AWS

Instance Size

Page 13: Maximizing MongoDB Performance on AWS

Instance Size Recommendations

• Err on the side of going larger and scaling down as needed.

• MongoDB working set should fit in memory

• M4, I2, and R3 Amazon EC2 instance types tend to be most successful and widely deployed in customer deployments

Page 14: Maximizing MongoDB Performance on AWS

Instance Size Recommendations

• One mongod process per instance to avoid processes competing for system resources

Page 15: Maximizing MongoDB Performance on AWS

Additional Recommendations

Page 16: Maximizing MongoDB Performance on AWS

Resilience

Page 17: Maximizing MongoDB Performance on AWS

Resilience

Page 18: Maximizing MongoDB Performance on AWS

Approaches to running your MongoDB deployment in AWS

• Manage everything yourself. Things to consider:

• Storage/Disk• Networking• Instance Size (Memory &

CPU)

• Rely on a “MongoDB” service with best practices built in.

Page 19: Maximizing MongoDB Performance on AWS

Operations Burden

PATCHES

UPGRADES

SECURITY

BACKUPS

RECOVERY

99.999% UPTIME

UPSCALE

DOWNSCALE

PERFORMANCE

UAT

STAGING

MONITORING

ALERTS

PROVISION

CONFIGURE

INSTALL

Page 20: Maximizing MongoDB Performance on AWS

Automated Available On-Demand

Secure Highly Available Automated Backups

Elastically Scalable

Database as a Service for MongoDB

Page 21: Maximizing MongoDB Performance on AWS
Page 22: Maximizing MongoDB Performance on AWS

Questions ?