-1

How can i configure mongodb's pool connection for support 1100 threads per seconds?

I tried some configurations like bellow without sucess.

connectionsPerHost = 200
threadsAllowedToBlockForConnectionMultiplier = 5

Can someone help me?

Thanks.

Stennie
  • 63,885
  • 14
  • 149
  • 175
Bernardo Maia
  • 99
  • 1
  • 6

1 Answers1

1

It won't.

That number of threads may be prejudicial, there's a lot of techniques to calculate some ideal number, and none of them get even close to 1100. If you're looking to attend a large number of users you should work with server redundancy. You won't get speed because 99.9% (really) of your threads will be locked waiting for a resource become available.

I've worked with java in fast processing, using distributed systems and threads, we used 0mq(tcp alternative) to acelerate communication and get more use of the threads, but we found that moderate number of threads was the ideal (if I remember correctly, 12).

Instead of letting hundreds of threads do the job, try to keep a limited number of workers threads, you won't have more resources anyway. The ideal for this kind of application would be have many servers attending your users.

Pedro Ivan
  • 322
  • 1
  • 14