willbmoss
Joined 17 years ago
Joined 17 years ago
1. Since Mongo has a database (or maybe collection now) level lock, doing rebalancing under a heavy write load is impossible.
3. Mongos creates one thread per connection. This means that if you've got to be very careful about the number of clients you start up at any given time (or in total).
1. Add individual nodes to the cluster and have it automatically rebalance over the new nodes.
2. Have it function without intervention in the face of node failure and network partitions.
3. Query any node in the cluster for any data point (even if it doesn't have that data locally).
I'm sure there's other things I'm missing, but the point made by timdoug is the key one. We're at a scale now where it's worth trading up-front application code for reliability and stability down the line.
[1] https://github.com/wmoss/Key-Value-Polyglot
[2] diesel.io
[3] https://github.com/jamwt/diesel
[4] The first run is against the diesel one
wmoss@wmoss-mba:~/etc/Key-Value-Polyglot$ time python test.py
real 0m0.134s
user 0m0.040s
sys 0m0.020s
wmoss@wmoss-mba:~/etc/Key-Value-Polyglot$ time python test.py
real 0m20.164s
user 0m0.096s
sys 0m0.072s
Level also has to look down the entire tree if a key is missing. This means inserts end up being more expensive than reads or updates (which are all just a hash lookup in Bitcask).