7. November 2009 — MongoDB 1.2
• More indexes per collection
• Faster index creation
• Map/Reduce
• Stored JavaScript functions
• Configurable fsync time
• Several small features and fixes
7
{.}
20. Modeling data in MongoDB
20
• JSON won the internet
• Don’t write your own JSON storage engine
• Flexible schemas promote app simplicity
• Validation is your responsibility
• Invest in schema design early
31. Latency comes from
31
• Writing data to your database
• Reading data from your database
• Aggregating data from multiple locations
• Running complex calculations
47. Scaling data access
47
• Decouple load from latency
• Queries are expensive
• Aggregation is expensive
• Do calculation in the background
• Serve content from single* documents
75. Growing load
75
• Denormalize for constant access time
• Use MongoDB atomic operators
• Check out optimistic locking and MVCC
• Leverage external concurrency control
• Watch your oplog
81. So there we have it
• Design your schema to MongoDB’s strengths
• Use monolithic documents
• Don’t do (live) querying
• You can still do transactional things
• You may need to denormalize & propagate
• Think about your overall architecture
81
82. 82
• have a sense of humor
• know what use cases work best
• remember that databases are hard
• don’t understate the difficulty in scaling up
@holacrat