SlideShare a Scribd company logo
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 (14)

KEY
sinsai.infoの裏側(インフラ偏)
Michael H. Oshita
 
PPTX
Zarafa Scaling & Performance
Zarafa
 
PPTX
Npm and bower
Joan Yin
 
PDF
WordCamp RVA
codearachnid_test
 
PPT
Deploying On EC2
Steve Loughran
 
ODP
Optimizing InnoDB bufferpool usage
Zarafa
 
ODP
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa
 
PPTX
Silicon Motion NVMe PCIe SSD controllers introduction
Silicon Motion
 
PDF
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
James Stone
 
PDF
Дмитро Волошин "High[Page]load"
Fwdays
 
PDF
Configuring MongoDB HA Replica Set on AWS EC2
ShepHertz
 
PPTX
Apache Mesos Distributed Computing Talk
brandongulla
 
PDF
Optimising PyroCMS for speed and performance boosts
saintsatplay
 
PPT
High Performance WordPress
Barry Abrahamson
 
sinsai.infoの裏側(インフラ偏)
Michael H. Oshita
 
Zarafa Scaling & Performance
Zarafa
 
Npm and bower
Joan Yin
 
WordCamp RVA
codearachnid_test
 
Deploying On EC2
Steve Loughran
 
Optimizing InnoDB bufferpool usage
Zarafa
 
Zarafa SummerCamp 2012 - Tips & tricks for running Zarafa is larger scale env...
Zarafa
 
Silicon Motion NVMe PCIe SSD controllers introduction
Silicon Motion
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
James Stone
 
Дмитро Волошин "High[Page]load"
Fwdays
 
Configuring MongoDB HA Replica Set on AWS EC2
ShepHertz
 
Apache Mesos Distributed Computing Talk
brandongulla
 
Optimising PyroCMS for speed and performance boosts
saintsatplay
 
High Performance WordPress
Barry Abrahamson
 

Similar to Growing MongoDB on AWS (20)

PDF
Development to Production with Sharded MongoDB Clusters
Severalnines
 
KEY
2011 mongo sf-scaling
MongoDB
 
KEY
MongoDB vs Mysql. A devops point of view
Pierre Baillet
 
PPTX
Back to Basics Webinar 6: Production Deployment
MongoDB
 
PPTX
Availability and scalability in mongo
Md. Khairul Anam
 
PDF
MongoDB - Riviera Dev 2018
Maxime Beugnet
 
KEY
Scaling with MongoDB
MongoDB
 
KEY
Deployment Strategy
MongoDB
 
KEY
Discover MongoDB - Israel
Michael Fiedler
 
PPTX
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
PDF
MongoDB Sharding
uzzal basak
 
PPT
2011 mongo FR - scaling with mongodb
antoinegirbal
 
PPTX
Back tobasicswebinar part6-rev.
MongoDB
 
PDF
MongoDB: Advantages of an Open Source NoSQL Database
FITC
 
PPTX
Agility and Scalability with MongoDB
MongoDB
 
PPTX
Conceptos básicos. Seminario web 6: Despliegue de producción
MongoDB
 
PPTX
MongoDB at Scale
MongoDB
 
PPT
2010 mongo berlin-scaling
MongoDB
 
PPTX
Webinar: Serie Operazioni per la vostra applicazione - Sessione 6 - Installar...
MongoDB
 
KEY
Deployment Strategies
MongoDB
 
Development to Production with Sharded MongoDB Clusters
Severalnines
 
2011 mongo sf-scaling
MongoDB
 
MongoDB vs Mysql. A devops point of view
Pierre Baillet
 
Back to Basics Webinar 6: Production Deployment
MongoDB
 
Availability and scalability in mongo
Md. Khairul Anam
 
MongoDB - Riviera Dev 2018
Maxime Beugnet
 
Scaling with MongoDB
MongoDB
 
Deployment Strategy
MongoDB
 
Discover MongoDB - Israel
Michael Fiedler
 
Ops Jumpstart: MongoDB Administration 101
MongoDB
 
MongoDB Sharding
uzzal basak
 
2011 mongo FR - scaling with mongodb
antoinegirbal
 
Back tobasicswebinar part6-rev.
MongoDB
 
MongoDB: Advantages of an Open Source NoSQL Database
FITC
 
Agility and Scalability with MongoDB
MongoDB
 
Conceptos básicos. Seminario web 6: Despliegue de producción
MongoDB
 
MongoDB at Scale
MongoDB
 
2010 mongo berlin-scaling
MongoDB
 
Webinar: Serie Operazioni per la vostra applicazione - Sessione 6 - Installar...
MongoDB
 
Deployment Strategies
MongoDB
 
Ad

Recently uploaded (20)

PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Biography of Daniel Podor.pdf
Daniel Podor
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
July Patch Tuesday
Ivanti
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Ad

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