How is mongodb connection pooling increases memory consumption ?

Connection Creation MongoClientOptions options = MongoClientOptions.builder() .threadsAllowedToBlockForConnectionMultiplier(prop.getThreadsAllowedToBlock()) .connectionsPerHost(10) .connectTimeout(1000) .maxWaitTime(1000) .heartbeatConnectTimeout(prop.getHeartbeatConnectTimeout()) .socketTimeout(1000) .writeConcern(WriteConcern.ACKNOWLEDGED).build(); MongoClient mongoclient = new MongoClient(seeds,credential, options); credential, options); RAM, mainly. Every connection gets a stack-allocated, at the size of 1MB.The more connections you have, the more RAM is needed for them and the less RAM is available for keeping indices or the working set of data in RAM. Number of connections per application must be decided based on 1.Amount of memory available at server-side 2.Number of aggregation queries fired any given point of time 3.Working set at any given point of time And most importantly what is the expected performance at the client-side, if client should not wait for...