Page load times too slow
I've added an endpoint to my site which is receiving requests multiple times a second and then updating the database. The problem is that it's massively slowing down page load times - some times taking more than 50 seconds to load.
I've changed the runtime to V2 and increased the replicas to 4 but it's not made much difference. I'm currently using the Hobby plan and wonder if I need to upgrade to the Pro plan or just offload the database updates to Redis or another server entirely.
Any help would be much appreciated. Thanks!
Solution:Jump to solution
easiest way is to add a /ping endpoint to your application (without it executing any query) and just resolving the call directly
thats the easiest way to know if railway is slow...
8 Replies
Project ID:
N/A
N/A
Do you know where this is delay is comming from?
Is it purely the latency between you and the app?
or are there queries or other things that could slow down your app?
I agree, you are going to need more telementary, this is unlikely to be a hardware limitation, and more of a code bottleneck
Solution
easiest way is to add a /ping endpoint to your application (without it executing any query) and just resolving the call directly
thats the easiest way to know if railway is slow
Thanks for the suggestions.
I've managed to restructure the code so the number of api calls and database hits have been drastically reduced so it isn't causing any issues anymore.
I was just under the impression that the server would be able handle it as there were only around 2-3 requests per second coming in
it can, the issue was a code bottleneck, you where likely doing blocking tasks thus drastically lowering your throughput
Yeah, would seem that way. Will probably hand all this over to Redis if the traffic increases