Your SlideShare is downloading. ×
0
Amazon Web Services     Jared Rosoff      @forjared
Agenda• Single node  – Instance sizing  – Storage configuration  – OS configuration• Replica Set  – Availability Zones  – ...
INSTANCES, STORAGE AND SINGLENODE CONFIGURATION
Instance Sizing              32-bit = Don’t Use                       Small                  Arbiter / Config             ...
OS• Amazon OS now an option• Turn off atime• Raise file descriptor limits    cat >> /etc/security/limits.conf << EOF    * ...
A MongoDB Data Node This is your typical database node. Used for actual data storage. We’ll use this icon to represent thi...
A MongoDB Config Server      Used to store configuration data about shardeddeployments. Deployed as a set of 3 servers. Re...
A MongoDB Arbiter      Used to store configuration data about shardeddeployments. Deployed as a set of 3 servers. Relative...
REPLICA SET DESIGNS
Single Region Replica Set                                      Region  Availability Zone A          Availability Zone B   ...
Disaster Recovery Site                        Region 1                                       Region 2  Availability Zone A...
Multi Data Center       Region 1                       Region 2                    Region 3  Availability Zone A          ...
SHARDED CLUSTERS IN EC2
Single Region Sharded Cluster                                      Region  Availability Zone A          Availability Zone ...
Sharded with Disaster Recovery Site                         Region 1                                     Region 2  Availab...
Multi Region Sharded       Region 1                     Region 2                     Region 3  Availability Zone A        ...
SECURITY
Security GroupsComponent                          Default PortsMongoD                             27017, 28017 (Status pag...
Provisioning                              Region 1                                         Region 2  Group: app-servers   ...
Questions?• I am  – Jared Rosoff (jsr@10gen.com)• Try it out!  – http://www.mongodb.org/downloads  – http://www.mongodb.or...
Upcoming SlideShare
Loading in...5
×

Mongosv 2011 - MongoDB on Amazon EC2

3,734

Published on

Slides from the

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • At MongoDirector (www.mongodirector.com) we automate the entire process of deploying and managing Mongo replica sets and shards using a simple two step wizard. You can pick the number of replicas and shards and the regions in which you want to place them. Provisioned IOPS and RAID can be used for optimal performance. We also use LVM snapshots for backup so that your backups take the same amount of time irrespective of the size of data.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,734
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
44
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide
  • Why RAID 10? EBS failures don’t take down the node. Why EBS? More IOPs Easy replacement of volumes Easy to take backups
  • Why RAID1?Driver failure is a non issue Why EBS? Easy to take snapshots
  • Use priorities if you want to prefer one region as master over another. Can be extended to more than 3 regions Can have more than one node in each region
  • Transcript of "Mongosv 2011 - MongoDB on Amazon EC2"

    1. 1. Amazon Web Services Jared Rosoff @forjared
    2. 2. Agenda• Single node – Instance sizing – Storage configuration – OS configuration• Replica Set – Availability Zones – Disaster Recovery – Multi Data-Center• Sharded Cluster
    3. 3. INSTANCES, STORAGE AND SINGLENODE CONFIGURATION
    4. 4. Instance Sizing 32-bit = Don’t Use Small Arbiter / Config Big 32-bit = Don’t Use Huge
    5. 5. OS• Amazon OS now an option• Turn off atime• Raise file descriptor limits cat >> /etc/security/limits.conf << EOF * hard nofile 65536 * soft nofile 65536 EOF• DO NOT use large VM pages• Use ext4, xfs• Use RAID – RAID10 on MongoD – RAID1 on ConfigbDB• Warning! Known problems with Ubuntu 10.04 & EBS – https://bugs.launchpad.net/ubuntu/+source/linux-ec2/+bug/614853 – https://bugzilla.kernel.org/show_bug.cgi?id=16991
    6. 6. A MongoDB Data Node This is your typical database node. Used for actual data storage. We’ll use this icon to represent this type of node throughout this prezo. • 64-bit instancemongod • More RAM == better • Run EXT4 or XFS file system • Turn off atime & diratime EBS – RAID10 • EBS volumes in RAID10
    7. 7. A MongoDB Config Server Used to store configuration data about shardeddeployments. Deployed as a set of 3 servers. Relatively low load and storage requirements. • 64-bit instance – Micro is finemongoc • EBS volumes in RAID1 EBS – RAID1
    8. 8. A MongoDB Arbiter Used to store configuration data about shardeddeployments. Deployed as a set of 3 servers. Relatively low load and storage requirements. • Micro is finemongod -- • No storage requirements arbiter • Must be separate node from rest of replica set
    9. 9. REPLICA SET DESIGNS
    10. 10. Single Region Replica Set Region Availability Zone A Availability Zone B Availability Zone Cmongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10
    11. 11. Disaster Recovery Site Region 1 Region 2 Availability Zone A Availability Zone B Availability Zone Amongod mongod mongod Hidden EBS – RAID10 EBS – RAID10 EBS – RAID10
    12. 12. Multi Data Center Region 1 Region 2 Region 3 Availability Zone A Availability Zone A Availability Zone Amongod mongod mongod Priority 1 EBS – RAID10 EBS – RAID10 EBS – RAID10
    13. 13. SHARDED CLUSTERS IN EC2
    14. 14. Single Region Sharded Cluster Region Availability Zone A Availability Zone B Availability Zone Cmongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongoc mongoc mongoc EBS – RAID1 EBS – RAID1 EBS – RAID1
    15. 15. Sharded with Disaster Recovery Site Region 1 Region 2 Availability Zone A Availability Zone B Availability Zone Amongod mongod mongod hidden EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod hidden EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod hidden EBS – RAID10 EBS – RAID10 EBS – RAID10mongoc mongoc mongoc EBS – RAID1 EBS – RAID1 EBS – RAID1
    16. 16. Multi Region Sharded Region 1 Region 2 Region 3 Availability Zone A Availability Zone A Availability Zone Amongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongod mongod mongod EBS – RAID10 EBS – RAID10 EBS – RAID10mongoc mongoc mongoc EBS – RAID1 EBS – RAID1 EBS – RAID1
    17. 17. SECURITY
    18. 18. Security GroupsComponent Default PortsMongoD 27017, 28017 (Status page)MongoD Shard Server 27018MongoS 27017ConfigDB 27019• All nodes listen on all interfaces unless –bind_ip is specified• Specify alternate port with –port• Don’t mix names & IP’s. Names preferred (not ec2s)• Use security groups as access control lists • (e.g. allow 27017 from app servers, but not everybody)
    19. 19. Provisioning Region 1 Region 2 Group: app-servers Group: mongodb 2.2.2.2 1.1.1.1$ ec2-create-group mongodb --description "security group for mongodb nodes”$ ec2-create-group app-servers --description "security group for app servers## Allow mongodb nodes to talk to each other$ ec2-authorize mongodb –o mongodb –u <your ec2 account id>## Allow app servers to talk to mongodb nodes$ ec2-authorize mongodb –o app-servers –u <your ec2 account id>## Allow SSH access to MongoDB nodes$ ec2-authorize mongodb –p 22## Allow remote MongoDB nodes to talk to cluster$ ec2-authorize mongodb –s 1.1.1.1 –p 27017$ ec2-authorize mongodb –s 2.2.2.2 –p 27017
    20. 20. Questions?• I am – Jared Rosoff (jsr@10gen.com)• Try it out! – http://www.mongodb.org/downloads – http://www.mongodb.org/display/DOCS/Amazon +EC2
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×