> we could just reuse the DB instance for every request (one request per thread) and leaving the single connection open through out the life time of app.
Yes, PyMongo uses a socket per thread to connect. You can share one
instance of connection.Connection (or database.Database) among
multiple threads.
> Whats the use case to 'end_request()' on connection after every operation/end-of current thread and get it back from pool next time ?
PyMongo does not automatically return connections to the pool for
reuse by other threads. You have to call end_request to do that.
PyMongo also does not limit the number of connections it will make. If
there is no connection in the pool to reuse when your application
spawns a new thread PyMongo will just create a new connection. Re-
using connections by calling end_request will limit the total number
of connections to mongod.