Page load times too slow
nick12
HOBBYOP

2 years 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!

7 Replies

nick12
HOBBYOP

2 years ago

N/A


2 years 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
HOBBYOP

2 years ago

Thanks for the suggestions.


nick12
HOBBYOP

2 years 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
HOBBYOP

2 years 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


2 years ago

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


nick12
HOBBYOP

2 years ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...