Search code examples
javamultithreadingplayframework-1.x

Guideline to Configure max threads in Play framework


We use Playframework 1.x.

We haven't touched thread pool size and we use the default value which (nb processors + 1). Our production server has 4 core processor and I assume 5 threads at a time.

For use we need atleast 100 threads to be served at a time. Can we increase the thread pool size to 100, Will it make any issues?


Solution

  • In my project, we use about 30 thread pool to serve about 100 concurrent. Play 1.x works very fast so the threads can be released before next request to process.

    But you should make load test your code... I think it's not good if you increase thread pool to 100.

    By the way, you should use async job to implement your application as Play recommended: http://www.playframework.com/documentation/1.2.7/asynchronous