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

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -