Priority: Critical - P2
Resolution: Won't Do
Affects Version/s: 3.2.10
Fix Version/s: None
After looking source code and some testing,
I have recognized that mongos does not prepare connection to mongod even though mongo client connector established connections(between client drivers and mongos).
But this is a little bit risky at service starting time.
Usually service starting time, huge user requests are transmitted to mongod via mongos. But this time, there's no connections are established between mongos and mongod. To make things worse, mongos need to open connections for all mongod shards and need to authenticate for user.
These overheads cause connection spike at service starting time. (Look at the attached mongod connections metric graphs). In this test, there's only 14 mongos, But some service need to run 150 mongos.
If there's 150 mongos, connections of each mongod shard is spike to 30000. In this case, mongod server can't processing user request because mongod is too busy to open and close connection. Eventually mongod servers are hang.
So I think there's some preparation of connections between mongos and mongod. In current version, there's no way to control connections before running query.