Replies: 4 comments 1 reply
-
That's weirdly bad. Is the project using synchronous logic for its entry points, maybe? Play is really designed to be used all-async, all the time, at least for any sort of serious work -- if you try to do everything synchronously, I can imagine hitting all sorts of bottlenecks. |
Beta Was this translation helpful? Give feedback.
-
I think it would be better to find out where in the Play Framework the request is stuck. If the problem is simply not accepting HTTP requests, I recommend that try changing the thread pool. If you are experiencing timeouts in Play Framework, changing the thread pool is one thing to consider. You may also consider increasing the number of app instances in the Play Framework. |
Beta Was this translation helpful? Give feedback.
-
This dependes very much on your application (it's intended purpose and how it was built.) Some years ago (2015-ish, I think) I had a Play app successfully handling 20k concurrent connections on a single instance. It was a chat app which used the Akka Actor capabilities available from Play. I just created a new Play app from a template (https://developer.lightbend.com/start/?group=play&project=play-samples-play-scala-starter-example) and I get:
This is on a laptop with i7-8850H processor. When under load the application uses 1GB of memory (that't total, as seen from the OS.) Note, however, that the tested endpoint only maintains simple internal state, it does not talk to a database or any outside API. If your application is a typical database-backed business web app you may want to play with thread pools: https://www.playframework.com/documentation/2.8.x/ThreadPools#Understanding-Play-thread-pools and also investigate optimization opportunities on the database. (Note that the template I used for this micro benchmark doesn't build out of the box. I had to make small tweaks to the build definition) |
Beta Was this translation helpful? Give feedback.
-
Thank you all for your answers! Unfortunately we didn't developp the project so I have to dig further into it to understand how it was written. Basically we are asked to fix the low performance of the project, and our main focus was on the proxy and the Akka Server. We noticed the mysql process uses a huge amount of memory. Something like 1500 % on a 32 core ubuntu. This could be the bottleneck I guess. I will investigate deeper and I'll tell you the results ;) Benchmarking the app will certainly help. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
We are working on a web project written in scala, using play framework and an Nginx reverse proxy. This project was developped by another team, and does not support many concurrent connections. Once we reach a certain limit (about 50 by using the wrk tool for the diagnosis), the loading time of every page is terrible (reaching the nginx timeout).
We have the same problem, whether using the reverse proxy or directly connecting to the app through http://private_ip:9100
To me this sounds like a configuration problem of the AKKA http server. How to configure the Akka server like we do for apache or Nginx?
Already tested this without success : Scaling Play 2.7.x (with Akka HTTP Server) for a large number of concurrent SSE connections
https://discuss.lightbend.com/t/scaling-play-2-7-x-with-akka-http-server-for-a-large-number-of-concurrent-sse-connections/7679/6
Thank you very much
Beta Was this translation helpful? Give feedback.
All reactions