Post on 25-May-2015
NoSQL at About.me
Luke GotszlingAol
about.me/lukeluke@about.me
February 8, 2012NoSQL in the Real World
1
NoSQL
★ Membase
• Sessions
• User profile data
• Dashboard data
• Rate limits
• ...
★ MongoDB
• User profile data
• Dashboard data
• Asynchronous task queues
• ...
2
• Don’t roll your own client-side key hashing algorithm
• Scales up and down
• No change in application
• No new libraries
• Web console for admin
• 20MB object limit by default
• Operational differences
• Need to be aware of utilization
Membasehttp://www.couchbase.com/membase
3
Membase
• Like memcached (ascii and binary)• Sharding invisible to the application
(moxi proxy)• Disk persistence / failover options• Dynamically add and remove nodes• 3ms inter-datacenter retrieval
(including application latency)• New version: Couchbase
http://www.couchbase.com/membase
4
Image used with permission from Couchbase
Membase:Architecture
http://www.couchbase.com/docs/membase-manual-1.7/membase-deployment.html
5
Image used with permission from Couchbase
Membase:Web Console
http://www.couchbase.com/docs/membase-manual-1.7/membase-admin-web-console.html
6
MongoDB: Part 1
★ Document store• Some user data and memoized
information• about.me: 44kB avg. document size
http://www.mongodb.org
7
MongoDB: Part 2
★Message queue• Not AMQP• Tailored persistence• Async operations• Batch processes• Per message
(document) atomicity
• Ability to re-shard dynamically
• Operational familiarity
• But... need to poll• See my mongoSV
presentation: bit.ly/mongo-as-mq
http://www.mongodb.org
8
MongoDB: Part 3
★Auto-increment document store• Autoincrementing data storage classes• Custom class-based ORM• AutoIncrement: side counting collection
or optimistic loop [1]
• ACID
[1] http://www.mongodb.org/display/DOCS/How+to+Make+an+Auto+Incrementing+Field
http://www.mongodb.org
9
Don’t forget to Shard each collection
10