mongodb - PyMongo: Should I use single or multiple clients? -


the question simple: should keep operations single mongoclient? single client or multiple clients better other?

the mongoclient maintains connection pool. having multiple clients not have advantages. quite contrary, since new client has connect mongodb first, requires 3 way handshake , other overhead each time new client created.

since multiple clients have disadvantages single application, answer is: create 1 client , use everywhere need make connection.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -