Page load times too slow

nick12
HOBBY

a year ago

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!

0 Replies

nick12
HOBBY

a year ago

N/A


a year ago

I agree, you are going to need more telementary, this is unlikely to be a hardware limitation, and more of a code bottleneck


nick12
HOBBY

a year ago

Thanks for the suggestions.


nick12
HOBBY

a year ago

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.


nick12
HOBBY

a year ago

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


a year ago

it can, the issue was a code bottleneck, you where likely doing blocking tasks thus drastically lowering your throughput


nick12
HOBBY

a year ago

Yeah, would seem that way. Will probably hand all this over to Redis if the traffic increases


Page load times too slow - Railway Help Station