Default akka-http config in Play! not able to handle high concurrent request

scala
akka-http
(Gary Lo) #1

I benchmarked the play-scala example project and the result is dissatisfying. I have opened a issue on GitHub, please take a look.

1 Like
(Rich Dougherty) #3

One thing you can try is disabling some or all of Play’s default filters: https://www.playframework.com/documentation/2.6.x/Filters#Disabling-Default-Filters. These filters were added in Play 2.6 and they probably haven’t been tuned for performance yet.

If you do any profiling I’d be interested to know if you find anything that’s slow that we can fix.

(Gary Lo) #4

I already disabled all filters before benchmark.

Please check the modification.

when I enable debug log, it shows

[debug] a.i.TcpListener - New connection accepted
[debug] a.i.TcpListener - New connection accepted
[debug] a.i.TcpListener - New connection accepted
[debug] a.i.TcpIncomingConnection - Closing connection due to IO error java.io.IOException: Connection reset by peer
(Rich Dougherty) #5

Based on the changes you made to application.conf you will still have the default filters enabled. Check out the docs. How to disable them:

To remove the default filters, you can set the entire list manually [in the application.conf]:

play.filters.enabled=[]

If you want to remove all filter classes, you can disable it through the disablePlugins mechanism [in your build.sbt]:

lazy val root = project.in(file(".")).enablePlugins(PlayScala).disablePlugins(PlayFilters)
(Patrick Li) #6

Just curious @gaplo917, do you see this with using Netty instead of Akka HTTP?

#7

@chrono_b, I posted my observations (which are more ambiguous probably) but perhaps at least add to @gaplo917 test project.

Here is my post… I switched back to netty because akka-http was performing horribly for me.

Poor Akka HTTP Performance … apparently