Reputation: 348
I followed this tutorial and there is configuration connections per host.
What is this?
Upvotes: 4
Views: 8227
Reputation: 667
connectionsPerHost are the amount of physical connections a single Mongo client instance (it's singleton so you usually have one per application) can establish to a mongod/mongos process. At time of writing the java driver will establish this amount of connections eventually even if the actual query throughput is low (in order words you will see the "conn" statistic in mongostat rise until it hits this number per app server).
There is no need to set this higher than 100 in most cases but this setting is one of those "test it and see" things. Do note that you will have to make sure you set this low enough so that the total amount of connections to your server do not exceed Found here How to configure MongoDB Java driver MongoOptions for production use?
Upvotes: 5