How does a connection pool in MongoDB with pymongo driver?

centum picture centum · Apr 29, 2013 · Viewed 13.2k times · Source

I'm using mongodb with pymongo driver on gevent based framework. I don't understand working pool connection. I'm creating a new connection instance on every request:

connection = MongoClient(host='localhost', port=27017, use_greenlets=True)

Actually connection taken from a pool of?

Now, if I take the connection so:

connection = MongoClient(host='localhost', port=27017)

This is connection taken from with the same pool? What happens if you make a call MongoClient different arguments?

Answer