Deploying MongoDB can be a challenge if you don't understand how resources are used nor how to plan for the capacity of your systems. If you need to deploy, or grow, a MongoDB single instance, replica set, or tens of sharded clusters then you probably share the same challenges in trying to size that deployment. This talk will cover what resources MongoDB uses, and how to plan for their use in your deployment. Topics covered will include understanding how to model and plan capacity needs from the perspective of a new deployment, growing an existing one, and defining where the steps along scalability on your path to the top. The goal of this presentation will be to provide you with the tools needed to be successful in managing your MongoDB capacity planning tasks.
2. This deck is a work in progress!
• Written by Asya (and presented by her a few
times)
• …but it’s still new, so you may want to rehearse it a
few extra times before presenting
3. Capacity Planning: Why, What, When
• Don't be the "goat" – spent too much $ or caused
failure of site, etc.
• Users frequently ask about HW they need for their
application. What does 10gen "recommend"?
• No right answer in a vacuum.
• Why we need to plan to meet expectations, etc.
– future planning
• data increases, don't want performance drop-off
5. Why
• Once we launch, we don't want to have avoidable
down time due to poorly selected HW
• As our success grows we want to stay in front of
the demand curve
• We want to meet business' and users' expectations
• We want to keep our jobs J
• and get big raises! ;)
9. What
• There is one thing that is absolutely mandatory to
have in order to succeed in capacity planning
• Without it, you will not be successful
• We must have REQUIREMENTS from business
– without requirements, we're building a roadmap without
knowing the desired destination
Imagine building a car without knowing what its top speed
should be, acceleration, MPH, and cost?
11. What
• Availability: what is uptime requirement?
• Throughput
– average read/write/users
– peak throughput?
– OPS (operations per second)? per hour? per day?
• Responsiveness
– what is acceptable latency?
– is higher during peak times acceptable?
32. Starter Questions
• What is the working set?
– How does that equate to memory
– How much disk access will that require
• How efficient are the queries?
• What is the rate of data change?
• How big are the highs and lows?
33. Deployment Types
All of these use the same resources:
• Single Instance
• Multiple Instances (Replica Set)
• Cluster (Sharding)
• Data Centers
36. Models
• Load/Users
– Response Time/TTFB
• System Performance
– Peak Usage
– Min Usage
37. Velocity of Change
• Limitations -> takes time
– Data Movement
– Allocation/Provisioning (servers/mem/disk)
• Improvement
– Limit Size of Change (if you can)
– Increase Frequency
– MEASURE its effect
– Practice