This presentation will discuss scalability best practices with MongoDB. We will review how the following affect scalability: schema design, locking granularity within versions and engines, scaling vertically or horizontally, and collection sharding. Understanding how these topics can affect your application will help you avoid complications as your data and workload grows.
2. Background
• Started out in relational databases in public
education then financial services
• Next came online media distribution
• For analytics, started working with columnar
databases and engines with compression
• First NoSQL project was application regression
testing
• Made the switch to NoSQL at ObjectRocket by
Rackspace
www.objectrocket.com
2
3. Overview
• General Scalability
• Schema Design
• Scaling Options in MongoDB
• Locking
• Sharding
• Right Tool For the Job
www.objectrocket.com
3
7. Scaling Options
In MongoDB • Vertical
• Replica Set
• Sharding (Horizontal)
• Pluggable Engine
www.objectrocket.com
7
8. Vertical
www.objectrocket.com
Client
• Hardware / Topology
• Reduced Complexity
• Increased Hardware Cost
• Upgrade Cycles
• Application Use Cases
• Requires Read Consistency
• Not Able To Shard
• Sharding Not Required
8
9. Replica Set
www.objectrocket.com
Client
• Hardware / Topology
• Reduced Complexity
• Reduced Hardware Cost
• Application Use Cases
• Allows For Eventual Consistency
• Not Able To Shard
• Sharding Not Required
9
22. Using the Right Tool :
Mongo
• Unstructured Data
• Retail Catalog Data
• Social Media User Data
• Analytic Data Rollups
• Gaming Profiles
www.objectrocket.com
22
23. Using the Right Tool :
... maybe not Mongo
• Text Search
• Geo
• Key / Value
• Transactions
www.objectrocket.com
23