|
Until we get better measurement ability from mongod for chunk ranges, instead of mongoses independently deciding when to split we could potentially get more deterministic and less aggressive splitting behavior by periodically recording and incrementing our chunk write totals to the config.chunks collection itself. The balancer process on each mongos could both record this information on wake-up and then use it to drive splits from a single source. Since the chunk write totals and the split point calculations are heuristics in any case, issues with stale config data, bad connections, and inexact totals wouldn't necessarily cause many problems.
This would also let us periodically sanity-check collections for shards with lots of data but not many chunks and automatically try to fix them.
Auto-migrates currently driven by splits might also be easier managed from one place as "if high chunk got a bunch of writes in last 30s, split it at the top and move it".
|