3 ms·
There were many potentially other solutions to this issue. The clients could have buffered writes locally, and done batch updates to MongoDB instead of incremen
by armon 13y ago
There were many potentially other solutions to this issue. The clients could have buffered writes locally, and done batch updates to MongoDB instead of incrementing each time.
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.
- nasalgoat 13y agoI ahve to agree - this really seems like making a square peg fit in a round hole. 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.