SlideShare a Scribd company logo
1 of 23
Download to read offline
Growing MongoDB
    on AWS
    Colin Howe
    @colinhowe
Who am I?
I run engineering at Conversocial.
We help companies do social customer service.
http://www.conversocial.com

Love coding, ultimate frisbee and pudding
Growing MongoDB on AWS
Tips for ensuring you can grow MongoDB on
AWS as your business needs grow.




             Mandatory meaningless graph
Single Server - Ephemeral
Single server with instance storage.
Not really advised.

Must haves:
● Journalling
  http://www.mongodb.org/display/DOCS/Journaling

● Regular backups
  http://www.mongodb.org/display/DOCS/Backups
Single Server - Ephemeral
Pros:
Easy to configure.
Cheap.

Cons:
No redundancy.
Data since last backup is lost on server death.
Single Server - EBS
Same as the last but move storage over to
EBS.

EBS is slow.
RAID 10 it.
http://bit.ly/mongodb-raid10
Single Server - EBS
Pros:
Easy to configure.
Data should still be available on server death.
Cheapish.

Cons:
No redundancy.
Single Server - No redundancy
Enter Replication
Primary server replicates to secondary servers

Use multiple Availability Zones (AZs).
Two servers, one arbiter
Cheapest replica set configuration.

Arbiter ensures an odd number of votes.

The arbiter can be a micro instance.
Two servers, one arbiter
Pros:
Cheapish.
Some failover.

Cons:
Only one failover. What if you fail again?
Three servers
Standard replica set configuration.
Three servers
Pros:
Lots of redundancy.
High read capacity when one server fails.

Cons:
Starts to get pricey.
Where next?
Horizontal and vertical scaling.
Vertical scaling
Use EBS boot.

Turn the server off. Resize. Turn it back on.

Seconds of downtime when using a replica set.

Without replica sets you will have downtime
Vertical scaling - SSDs
If you can afford them SSDs are the King.

● Conversocial got 43% faster.

● 90% iowait went to ~3% user, 0% iowait.

All numbers compared to instance with largest
memory (68.4gb)
Horizontal read scaling
Add more secondaries and use slave queries.

Really easy.

Make sure you have a hidden backup server.
Backups kill read performance.

Use write concerns for consistent reads.
Horizontal write scaling - Sharding
Fairly easy with MongoDB.

Backups get harder.

More to manage and configure. Automate it.
When to Shard?
If you know your data structure then sooner

If you don't... later

Changing shard keys is not trivial
Enterprise Availability
If you're hunting for the final decimal places of
availability...

You're probably going to break your application
more frequently than Amazon has a whole
region outage.

But...
Enterprise Availability
Multiple regions are the next step.

Harder as you go outside the firewall.

VPNs or SSH tunnels are your friend here.
Tools to Help You
MMS - Mongo's Monitoring System (FREE)

Chef/Puppet - automate as much as you can

#mongodb and MongoDB user group

10gen
Thanks for Listening!
  Any questions?

           Feeling shy?
You can always reach me on Twitter
           @colinhowe


      Slides will be put online

More Related Content

What's hot

Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Atwix
 
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for HomeAmazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services
 
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa
 

What's hot (18)

Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
 
SSDs are Awesome
SSDs are AwesomeSSDs are Awesome
SSDs are Awesome
 
sinsai.infoの裏側(インフラ偏)
sinsai.infoの裏側(インフラ偏)sinsai.infoの裏側(インフラ偏)
sinsai.infoの裏側(インフラ偏)
 
Zarafa Scaling & Performance
Zarafa Scaling & PerformanceZarafa Scaling & Performance
Zarafa Scaling & Performance
 
Npm and bower
Npm and bowerNpm and bower
Npm and bower
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
Amazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for HomeAmazon Web Services Customer Case Study, Fashion for Home
Amazon Web Services Customer Case Study, Fashion for Home
 
Deploying On EC2
Deploying On EC2Deploying On EC2
Deploying On EC2
 
Optimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usageOptimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usage
 
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
 
Silicon Motion NVMe PCIe SSD controllers introduction
Silicon Motion NVMe PCIe SSD controllers introductionSilicon Motion NVMe PCIe SSD controllers introduction
Silicon Motion NVMe PCIe SSD controllers introduction
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
 
Дмитро Волошин "High[Page]load"
Дмитро Волошин "High[Page]load"Дмитро Волошин "High[Page]load"
Дмитро Волошин "High[Page]load"
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2
 
Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk
 
Optimising PyroCMS for speed and performance boosts
Optimising PyroCMS for speed and performance boostsOptimising PyroCMS for speed and performance boosts
Optimising PyroCMS for speed and performance boosts
 
STP201 Efficiency at Scale - AWS re: Invent 2012
STP201 Efficiency at Scale - AWS re: Invent 2012STP201 Efficiency at Scale - AWS re: Invent 2012
STP201 Efficiency at Scale - AWS re: Invent 2012
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
 

Similar to Growing MongoDB on AWS

MongoDB in the Cloud -- Mongo Boulder
MongoDB in the Cloud -- Mongo BoulderMongoDB in the Cloud -- Mongo Boulder
MongoDB in the Cloud -- Mongo Boulder
Justin Smestad
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 
Rocking mongo db on the cloud
Rocking mongo db on the cloudRocking mongo db on the cloud
Rocking mongo db on the cloud
MongoDB
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
guest18a0f1
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best Practices
MongoDB
 
2010 mongo berlin-scaling
2010 mongo berlin-scaling2010 mongo berlin-scaling
2010 mongo berlin-scaling
MongoDB
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
Cal Henderson
 

Similar to Growing MongoDB on AWS (20)

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
MongoDB in the Cloud -- Mongo Boulder
MongoDB in the Cloud -- Mongo BoulderMongoDB in the Cloud -- Mongo Boulder
MongoDB in the Cloud -- Mongo Boulder
 
Webinar slides: The Holy Grail Webinar: Become a MySQL DBA - Database Perform...
Webinar slides: The Holy Grail Webinar: Become a MySQL DBA - Database Perform...Webinar slides: The Holy Grail Webinar: Become a MySQL DBA - Database Perform...
Webinar slides: The Holy Grail Webinar: Become a MySQL DBA - Database Perform...
 
Amazon web services : Layman Introduction
Amazon web services : Layman IntroductionAmazon web services : Layman Introduction
Amazon web services : Layman Introduction
 
Percona Live 2014 - Scaling MySQL in AWS
Percona Live 2014 - Scaling MySQL in AWSPercona Live 2014 - Scaling MySQL in AWS
Percona Live 2014 - Scaling MySQL in AWS
 
Mysql talk
Mysql talkMysql talk
Mysql talk
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
Rocking mongo db on the cloud
Rocking mongo db on the cloudRocking mongo db on the cloud
Rocking mongo db on the cloud
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
Web20expo Scalable Web Arch
Web20expo Scalable Web ArchWeb20expo Scalable Web Arch
Web20expo Scalable Web Arch
 
MongoDB and AWS Best Practices
MongoDB and AWS Best PracticesMongoDB and AWS Best Practices
MongoDB and AWS Best Practices
 
RDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and PatternsRDS for MySQL, No BS Operations and Patterns
RDS for MySQL, No BS Operations and Patterns
 
NEW LAUNCH! Introducing PostgreSQL compatibility for Amazon Aurora
NEW LAUNCH! Introducing PostgreSQL compatibility for Amazon AuroraNEW LAUNCH! Introducing PostgreSQL compatibility for Amazon Aurora
NEW LAUNCH! Introducing PostgreSQL compatibility for Amazon Aurora
 
MySQL on AWS RDS
MySQL on AWS RDSMySQL on AWS RDS
MySQL on AWS RDS
 
MySQL Oslayer performace optimization
MySQL  Oslayer performace optimizationMySQL  Oslayer performace optimization
MySQL Oslayer performace optimization
 
2010 mongo berlin-scaling
2010 mongo berlin-scaling2010 mongo berlin-scaling
2010 mongo berlin-scaling
 
Scalable Web Arch
Scalable Web ArchScalable Web Arch
Scalable Web Arch
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
 
AWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon AuroraAWS August Webinar Series - Introducing Amazon Aurora
AWS August Webinar Series - Introducing Amazon Aurora
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Growing MongoDB on AWS

  • 1. Growing MongoDB on AWS Colin Howe @colinhowe
  • 2. Who am I? I run engineering at Conversocial. We help companies do social customer service. http://www.conversocial.com Love coding, ultimate frisbee and pudding
  • 3. Growing MongoDB on AWS Tips for ensuring you can grow MongoDB on AWS as your business needs grow. Mandatory meaningless graph
  • 4. Single Server - Ephemeral Single server with instance storage. Not really advised. Must haves: ● Journalling http://www.mongodb.org/display/DOCS/Journaling ● Regular backups http://www.mongodb.org/display/DOCS/Backups
  • 5. Single Server - Ephemeral Pros: Easy to configure. Cheap. Cons: No redundancy. Data since last backup is lost on server death.
  • 6. Single Server - EBS Same as the last but move storage over to EBS. EBS is slow. RAID 10 it. http://bit.ly/mongodb-raid10
  • 7. Single Server - EBS Pros: Easy to configure. Data should still be available on server death. Cheapish. Cons: No redundancy.
  • 8. Single Server - No redundancy
  • 9. Enter Replication Primary server replicates to secondary servers Use multiple Availability Zones (AZs).
  • 10. Two servers, one arbiter Cheapest replica set configuration. Arbiter ensures an odd number of votes. The arbiter can be a micro instance.
  • 11. Two servers, one arbiter Pros: Cheapish. Some failover. Cons: Only one failover. What if you fail again?
  • 12. Three servers Standard replica set configuration.
  • 13. Three servers Pros: Lots of redundancy. High read capacity when one server fails. Cons: Starts to get pricey.
  • 14. Where next? Horizontal and vertical scaling.
  • 15. Vertical scaling Use EBS boot. Turn the server off. Resize. Turn it back on. Seconds of downtime when using a replica set. Without replica sets you will have downtime
  • 16. Vertical scaling - SSDs If you can afford them SSDs are the King. ● Conversocial got 43% faster. ● 90% iowait went to ~3% user, 0% iowait. All numbers compared to instance with largest memory (68.4gb)
  • 17. Horizontal read scaling Add more secondaries and use slave queries. Really easy. Make sure you have a hidden backup server. Backups kill read performance. Use write concerns for consistent reads.
  • 18. Horizontal write scaling - Sharding Fairly easy with MongoDB. Backups get harder. More to manage and configure. Automate it.
  • 19. When to Shard? If you know your data structure then sooner If you don't... later Changing shard keys is not trivial
  • 20. Enterprise Availability If you're hunting for the final decimal places of availability... You're probably going to break your application more frequently than Amazon has a whole region outage. But...
  • 21. Enterprise Availability Multiple regions are the next step. Harder as you go outside the firewall. VPNs or SSH tunnels are your friend here.
  • 22. Tools to Help You MMS - Mongo's Monitoring System (FREE) Chef/Puppet - automate as much as you can #mongodb and MongoDB user group 10gen
  • 23. Thanks for Listening! Any questions? Feeling shy? You can always reach me on Twitter @colinhowe Slides will be put online