Mongodb and php: pooling

I am using a native driver in PHP to connect to the mongo database.

I don’t understand the concept of a connection pool: is it like a connection pool, and when a user opens a website, the connection is pulled out of this pool and used?

But what if you have multiple pages with code that uses mongoDB? Will the system pull a new connection out of the pool every time the user changes the page?

In general: how can I manage this "connection pool" (or it is automatically managed) when there are many simultaneous connections?

+5
source share
1 answer

I don’t understand the concept of a connection pool: is it like a connection pool, and when a user opens a website, the connection is pulled out of this pool and used?

Yes, that’s exactly what it is.

But what if you have multiple pages with code that uses mongoDB? Will the system pull a new connection out of the pool every time the user changes the page?

. , ( ), , script. - ( mongo.allow_persistent php.ini) .

: " " ( ), ?

. MongoPool.

+5

All Articles