Closed kahuang closed 5 years ago
Hi @kahuang,
Thanks for your contribution, but can you write some test that checks the functionality you just added?
Happy to add tests, what kind of tests did you have in mind?
Looking at the tests, I don't see anything for the current load balancing algorithm (BestFit), so am unsure what kind of tests you are looking for.
Any updates on this? This is basically necessary for any large deployment of mongo using mongos.
Hi @kahuang
I think we're more likely to go with the latency aware uniform node selection algorithm (thanks @xdg!) though there are a few edge cases to cover off before it's landed, including test coverage.
Thanks for taking the time to open a PR though - it's really appreciated.
Dom
strategy
Useful for when talking to mongoS instead of a cluster of mongoD's directly. The BestFit algorithm will form hotspots on particular mongoS when we want to share the load across all mongos that we are connected to