Advertisement

More Related Content

Viewers also liked(20)

Advertisement

Similar to High Performance MongoDB Clusters with Amazon EBS Provisioned IOPS (20)

More from Amazon Web Services(20)

Advertisement

High Performance MongoDB Clusters with Amazon EBS Provisioned IOPS

  1. High Performance MongoDB Clusters with Amazon EBS Provisioned IOPS Jafar Shameem Business Development Manager, Amazon Web Services Sandeep Parikh Solutions Architect, 10gen Miles Ward Solutions Architect, Amazon Web Services Charity Majors Engineer, Parse
  2. Agenda • AWS Storage Options and EBS • Introducing Provisioned IOPS • About MongoDB • MongoDB on AWS best practices • How Parse runs MongoDB on AWS and benefits from Provisioned IOPS
  3. Storage Options on AWS Block Storage Object Storage (Elastic Block Store) (S3, Glacier) Use for: Use for: • Access to raw • Pictures, videos, unformatted block highly durable level storage media storage • Persistent Storage • Cold storage for long-term archive
  4. Amazon Elastic Block Store (EBS) Elastic Block Storage: Persistent Storage for EC2 Feature Details High Mount EBS as drives and performance format as required file system Flexible size Volumes from 1GB to 1TB in size Secure Private to your instances Available Replicated within an High performance block storage Availability Zone device Backups Volumes can be snapshotted Mount as drives to instances for point in time restore Persistent and independent of Monitoring Detailed metrics captured via instance lifecycle Cloud Watch
  5. Introducing Provisioned IOPS Volumes
  6. Introducing Provisioned IOPS Volumes ❶ Select a new type of Provisioned IOPS volumes ❷ Specify the volume capacity ❸ Specify the number of IOs per second your application needs, up to 2000 PIOPS per volume. The volume will deliver the specified IO per second. $ ec2-create-volume --size 500 --availability-zone us-east-1b --type io1 –iops 2000
  7. When should I use Provisioned IOPS? • Standard volumes are designed for boot volumes, running applications with moderate and bursty IO, sequential IO access • Provisioned IOPS volumes are designed for running transactional applications that require high and consistent IO: o Relational Databases o NoSQL Databases, e.g. MongoDB o Productivity applications, e.g. Microsoft Exchange o Enterprise Applications
  8. #aws MongoDB and AWS Sandeep Parikh Solutions Architect, 10gen
  9. Database Landscape
  10. MongoDB Basics • Open source • Document database • High performance • Horizontally scalable • Fully featured • Built to match agile development and deployment
  11. MongoDB Features • Flexible document data model • Rich ad-hoc queries • Real-time aggregation • Support for geospatial data and queries • Built-in scalability – Redundancy, failover and auto-partitioning • Broad programming language support
  12. Relational Model
  13. MongoDB Data Model
  14. Content Operational High Volume User Data E-Commerce Management Intelligence Data Feeds Management Use Cases
  15. Scaling MongoDB • Replica Sets – Redundancy, failover, read scalability • Sharding – Auto-partitions data, read/write scalability • Multi-datacenter deployments • Tunable consistency • Engineering for zero downtime
  16. Replica Sets
  17. Sharding
  18. Mapping MongoDB to AWS • MongoDB scales easily across multiple nodes • High memory and fast storage • Durability and performance • Deploy across multiple data centers • Quickly add capacity
  19. High Performance Workloads • Instances support up to 240+ GiB memory • Provisioned IOPS provides consistent and predictable EBS performance • RAID10 maximizes performance and durability • EBS snapshots integrate with MongoDB – Fast and easy backup – Quickly restore and deploy additional nodes
  20. MongoDB on AWS Resources • Best practices for configuring MongoDB • MongoDB on AWS white paper • Sample CloudFormation templates to launch – Single node deployments – Pre-configured multi-node replica sets
  21. MongoDB Monitoring Service
  22. MongoDB on AWS Best Practices
  23. Scaling MongoDB over time
  24. IO Considerations MongoDB IO Workloads • Journal • Background flushing • Page Faults EBS Optimized RAID 10
  25. Extra big scale
  26. Backup MongoDB using low priority replica
  27. Testing random 4K reads • One Volume: ~200 MongoOPS with some variability, <1mb/s EBS • Loaded instance: ~ 1000 MongoOPS with some variability <10mb/s + PIOPS • One Volume: 2000 MongoOPS with <1% variability, 3mb/s • Loaded Instance: 20000 MongoOPS with <1% variability, 60mb/s • Hi1.4xlarge ephemeral: ~64,000 MongoOPS with low variability, SSD ~245mb/s
  28. Testing random 4K reads EBS + PIOPS + PIOPS SSD Stable Stable
  29. Stability Tips • Ext4 or XFS • Reduce I/O overhead – • nodiratime, noatime • Raise file descriptor limits • Set disk read-ahead • No large virtual memory pages • SNAPSHOT SNAPSHOT SNAPSHOT
  30. Parse runs on AWS • We provide a platform for mobile developers • SDKs and APIs for iOS, Android, Windows mobile apps -- 60,000 and counting • Highly elastic traffic patterns • As a platform, we can’t go down, so cloud computing is the only way to go
  31. Why we use MongoDB • Mongo is not optimized for one task, it’s very good across a broad range of tasks • Schema-less is a must • We can do auto-indexing based on an analysis of your traffic and data • Horizontal scalability • Reliability across multiple Availability Zones
  32. The ways we use MongoDB • User data • RAID 0 striped P-IOPS 1000 EBS volumes • smart indexing, EC2 snapshots, continuous compaction on snapshot nodes • sharded in the application layer • Common data • Real-time query analysis • ephemeral storage for disposable data • Billing and logging
  33. Things we’ve learned • Always use replica sets. Spread across AZs. • Chef everything so nodes are disposable • Warm up your secondaries before promoting. • Snapshot often. Never allow your snapshot host to become primary • set priority=0, also hidden=true if you read off secondaries • Use Provisioned IOPS and ebs_optimized if you care about your data
  34. End-to-end latency Before PIOPS: After PIOPS:
  35. In summary • We love MongoDB. The rate of development and improvement is incredible. • PIOPS made it feasible for us to stay on AWS • Parse wouldn’t be possible without both the elasticity and power of AWS and the functionality of MongoDB
  36. Get started on Provisioned IOPS today! aws.amazon.com/ebs Questions: e-mail: shameemj@amazon.com • MongoDB CloudFormation Templates: o http://docs.mongodb.org/ecosystem/tutorial/automate-deployment-with-cloudformation/ • MongoDB on AWS: o http://docs.mongodb.org/ecosystem/platforms/#amazon-web-services-ec2 • Slides will be made available here: o http://aws.amazon.com/ebs/webinars/ • Benchmarking EBS performance: o http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSPerformance.html

Editor's Notes

  1. We will post these slides on the EBS website soon.
Advertisement