this seed project can't handle high concurrent requests, any suggestion? #80
Comments
Play's able to handle massive concurrency just fine: projects that have reduced the number of servers by 80% because Play is more efficient at handling load. there are projects like https://github.com/tenorviol/play-c100k-test that do test out play's scalability, and the REST API has a load test built into it, which you may find more helpful: https://github.com/playframework/play-scala-rest-api-example/ Since the starter project is explicitly here to demo Play to first-time users and the general report is that play is fast, the most likely conclusion is that your benchmark is flawed in some way. This is not the right forum for that, as this issue tracker is specifically for fixing bugs in the project -- you can discuss the details on https://discuss.lightbend.com/c/play/ for more feedback. Alternately, if you can point to a bottleneck in the default configuration Play that is slowing it down, we can open a bug in playframework/playframework. |
Hi @wsargent thanks you for your response. I have used play-scala for two years since 2.4(using Netty). I know that it is much more efficient than PHP to handle high concurrency requests and picked to use it for our project API Servers at that moment. If you have checked my benchmark results, other JVM based web framework, Vert.x using Netty + Kotlin coroutine, is nearly 20x times thoughtput than PHP lumen) and in concurrency=50, is 2x times thoughtput than this play-scala project So, I am curious is that the default akka-http(switched from Netty since v2.5) config can’t high concurrency well? It is 100% reproducible on this starter proejct by my aforementioned steps I think a starter project is extremely important to illustrate how good a framework is and always ready for people to benchmark before picking it. That’s why I open the issue here. Do you have any suggested config for the machine on Google Cloud platform n1-standard-1 (1 vCPU 3.75GB RAM)? |
Again, this is not the place for back and forth suggestions -- I would recommend asking on https://discuss.lightbend.com/c/play/ and referring back to this issue. |
I am doing different benchmark(rps & latency) on different web framework using a HTTP benchmark client written in GO.
Other frameworks like
vert.x
,express
,spring-boot
... with no problem on handling high concurrency request(at least 1000) in their DEFAULT seed project. But this DEFAULT seed project do not.Benchmark Env
Benchmark is taken on Google cloud platform in
BOTH client & server set
ulimit -n 10000
Server run the following command:
Client run the following command:
Benchmark Result
But the benchmark result is very disappointing,
when concurrency = 50, it is fine
when concurrency = 250, there is already 33% of requests can't be processed
when concurrency = 2000, there is only ~3% request success
My Question
Any suggestion to tune the play-framework(underlying akka-http) to handle high concurrency request?
Play-scala Benchmark Source Code:
https://github.com/gaplo917/play-scala-starter-example/
Modification for the benchmark
gaplo917@5ad7cae
Other Benchmark results:
https://github.com/gaplo917/web-framework-benchmark
https://rawgit.com/gaplo917/web-framework-benchmark/master/charting/rps/index.html
https://rawgit.com/gaplo917/web-framework-benchmark/master/charting/latency/index.html
The text was updated successfully, but these errors were encountered: