We have a ktor back-end running in AWS ECS running...
# ktor
We have a ktor back-end running in AWS ECS running on top of about 8 EC2 instances. It currently handles somewhere in the neighborhood of 1.5 million requests per day and has had some serious performance issues. This ktor server replaced a single PHP server that was handling the same load and while that server was larger, it didn’t have any of the autoscaling that our ktor servers have built in and handled the load just fine. The ktor server objectively has more computing resources to work with. This app doesn’t do any heavy-duty processing. It receives requests from clients, does some database queries, and sends http requests. If you were trying to optimize this code, where might you start looking? CC @Derek Seroky
Maybe this is an obvious answer, but I would start with a profiler. However, just a wild guess, could it be that you have Automatic Reloading (https://ktor.io/servers/autoreload.html) enabled? As it says in the documentation, there is a performance penalty using it, and should not be used in production.
Thanks for the response @Eduard Boloș, do you have a profiler you would recommend? As for the wild guess, great thought, but I confirmed we are not using auto reload in either development or production.
I don’t have much experience with profilers, but I would probably go for either VisualVM or JProfiler.
A quick Google, and I see that there is also Stackify Retrace, an APM with a free trial that you can try out in a production environment.
Sounds good. We appreciate your help. Neither of us have any experience with JVM profilers but we’ll figure it out. Thanks!
👍 1