Connection multiplexing

24 views
Skip to first unread message

Sebastian

unread,
Apr 25, 2017, 10:59:49 AM4/25/17
to ReactiveMongo - http://reactivemongo.org
Hey everybody,

I'm currently load testing/profiling an application and trying to get an understanding on how to optimize the settings of the underlying connection pool.

Going through the MongoDB wire protocol documentation it seems like connection multiplexing (running multiple operations over one socket connection) is supported by the database via the requestId but I'm not sure how this is handled in ReactiveMongo.

As a general rule, do I need to use one connection (as in nbChannelsPerNode) per concurrent write/read operation or are multiple requests per channel possible? Are there any other things to consider to appropriately size the connection pool? 

Regards,
Sebastian

Cédric Chantepie

unread,
Apr 25, 2017, 8:15:15 PM4/25/17
to ReactiveMongo - http://reactivemongo.org
As indicated in the documentation ( http://reactivemongo.org/releases/0.12/documentation/tutorial/connect-database.html ), a MongoConnection instance is not a network channel, but a pool using many network channel to the nodes of the ReplicaSet. Except properly configuring the nodes addresses and the number of channel, there is nothing more to do about connection/pool management.
Reply all
Reply to author
Forward
0 new messages