Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
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.comLove co...
Growing MongoDB on AWSTips for ensuring you can grow MongoDB onAWS as your business needs grow.             Mandatory mean...
Single Server - EphemeralSingle server with instance storage.Not really advised.Must haves:● Journalling  http://www.mongo...
Single Server - EphemeralPros:Easy to configure.Cheap.Cons:No redundancy.Data since last backup is lost on server death.
Single Server - EBSSame as the last but move storage over toEBS.EBS is slow.RAID 10 it.http://bit.ly/mongodb-raid10
Single Server - EBSPros:Easy to configure.Data should still be available on server death.Cheapish.Cons:No redundancy.
Single Server - No redundancy
Enter ReplicationPrimary server replicates to secondary serversUse multiple Availability Zones (AZs).
Two servers, one arbiterCheapest replica set configuration.Arbiter ensures an odd number of votes.The arbiter can be a mic...
Two servers, one arbiterPros:Cheapish.Some failover.Cons:Only one failover. What if you fail again?
Three serversStandard replica set configuration.
Three serversPros:Lots of redundancy.High read capacity when one server fails.Cons:Starts to get pricey.
Where next?Horizontal and vertical scaling.
Vertical scalingUse EBS boot.Turn the server off. Resize. Turn it back on.Seconds of downtime when using a replica set.Wit...
Vertical scaling - SSDsIf you can afford them SSDs are the King.● Conversocial got 43% faster.● 90% iowait went to ~3% use...
Horizontal read scalingAdd more secondaries and use slave queries.Really easy.Make sure you have a hidden backup server.Ba...
Horizontal write scaling - ShardingFairly easy with MongoDB.Backups get harder.More to manage and configure. Automate it.
When to Shard?If you know your data structure then soonerIf you dont... laterChanging shard keys is not trivial
Enterprise AvailabilityIf youre hunting for the final decimal places ofavailability...Youre probably going to break your a...
Enterprise AvailabilityMultiple regions are the next step.Harder as you go outside the firewall.VPNs or SSH tunnels are yo...
Tools to Help YouMMS - Mongos Monitoring System (FREE)Chef/Puppet - automate as much as you can#mongodb and MongoDB user g...
Thanks for Listening!  Any questions?           Feeling shy?You can always reach me on Twitter           @colinhowe      S...
Prochain SlideShare
Chargement dans…5
×

Growing MongoDB on AWS

1 252 vues

Publié le

  • Soyez le premier à commenter

Growing MongoDB on AWS

  1. 1. Growing MongoDB on AWS Colin Howe @colinhowe
  2. 2. Who am I?I run engineering at Conversocial.We help companies do social customer service.http://www.conversocial.comLove coding, ultimate frisbee and pudding
  3. 3. Growing MongoDB on AWSTips for ensuring you can grow MongoDB onAWS as your business needs grow. Mandatory meaningless graph
  4. 4. Single Server - EphemeralSingle 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. 5. Single Server - EphemeralPros:Easy to configure.Cheap.Cons:No redundancy.Data since last backup is lost on server death.
  6. 6. Single Server - EBSSame as the last but move storage over toEBS.EBS is slow.RAID 10 it.http://bit.ly/mongodb-raid10
  7. 7. Single Server - EBSPros:Easy to configure.Data should still be available on server death.Cheapish.Cons:No redundancy.
  8. 8. Single Server - No redundancy
  9. 9. Enter ReplicationPrimary server replicates to secondary serversUse multiple Availability Zones (AZs).
  10. 10. Two servers, one arbiterCheapest replica set configuration.Arbiter ensures an odd number of votes.The arbiter can be a micro instance.
  11. 11. Two servers, one arbiterPros:Cheapish.Some failover.Cons:Only one failover. What if you fail again?
  12. 12. Three serversStandard replica set configuration.
  13. 13. Three serversPros:Lots of redundancy.High read capacity when one server fails.Cons:Starts to get pricey.
  14. 14. Where next?Horizontal and vertical scaling.
  15. 15. Vertical scalingUse 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. 16. Vertical scaling - SSDsIf 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 largestmemory (68.4gb)
  17. 17. Horizontal read scalingAdd 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. 18. Horizontal write scaling - ShardingFairly easy with MongoDB.Backups get harder.More to manage and configure. Automate it.
  19. 19. When to Shard?If you know your data structure then soonerIf you dont... laterChanging shard keys is not trivial
  20. 20. Enterprise AvailabilityIf youre hunting for the final decimal places ofavailability...Youre probably going to break your applicationmore frequently than Amazon has a wholeregion outage.But...
  21. 21. Enterprise AvailabilityMultiple regions are the next step.Harder as you go outside the firewall.VPNs or SSH tunnels are your friend here.
  22. 22. Tools to Help YouMMS - Mongos Monitoring System (FREE)Chef/Puppet - automate as much as you can#mongodb and MongoDB user group10gen
  23. 23. Thanks for Listening! Any questions? Feeling shy?You can always reach me on Twitter @colinhowe Slides will be put online

×