[SERVER-26720] Need to prepare initial connection between mongos and mongod Created: 21/Oct/16  Updated: 22/Jan/24

Status: Backlog
Project: Core Server
Component/s: Networking
Affects Version/s: 3.2.10
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: 아나 하리 Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File ConnectionSpike.png    
Issue Links:
Duplicate
is duplicated by SERVER-30526 Pre-populating connections of TaskExe... Closed
Related
Assigned Teams:
Service Arch
Sprint: Service Arch 2022-04-18, Service Arch 2022-05-02
Participants:
Case:

 Description   

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.



 Comments   
Comment by Lauren Lewis (Inactive) [ 09/Nov/21 ]

We haven’t heard back from you for some time, so I’m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Generated at Thu Feb 08 04:13:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.