Redis, MongoDB and the power of incremency
blog.mongohq.com
blog.mongohq.com
Using a local SQLite, I can do "update counts set val=val+1 where id=?;" ~250K times per second on a Macbook Air. It would've been simpler to just do a local aggregate and then a batch update. That avoids Redis durability issues, or a secondary merge process.
FWIW, a local Postgres can do only about 3200 increments per second.
As an aside, even on a 48-core box with 128GB memory, I was unable to get more than ~1000 inserts/sec with MongoDB, even without write confirm - I'm not sure what the bottleneck is with it.
also, if it's single threaded: why does adding more cores increase the update rate?
isn't the entire point of mongodb that it's fast? if it can only do 1500 increments a second it's pretty useless...
Edit: Confirmed in the blog comments.
Honestly, the entire point of Mongo isn't that it's fast, it's that it's fast enough and can scale a reasonably flexible schema through the life of an app.