Server overloaded -- How to Scale?
Hey guys, we're running into issues with our railway server being overloaded. We keep getting
503
errors Application failed to respond
. Is there a way to scale our railway server / enable autoscaling? Thanks!11 Replies
Project ID:
82091a0b-2976-40b9-bb0f-784a7f99567f
82091a0b-2976-40b9-bb0f-784a7f99567f
Autoscaling should be enabled by default 🤔
well it's not even an option
are you sure that it's server overloaded thing?
and yes, you can scale using replicas
https://docs.railway.app/develop/services#horizontal-scaling-with-replicas
We're on the Pro plan
Hmm
This is a screenshot of our metrics
Maybe the server isn't overloaded in terms of available CPU / Memory, but it's just that our code (nodejs server) is inefficient at handling many requests at a time, so it simply fails prior to the available CPU / Memory becoming saturated?
Ahh seems like increasing replicas fixed it! Thanks
Though I'd still be curious to know why it didn't autoscale in the default settings, as having to manually manage replicas isn't super convenient haha
autoscaling isn't available in Railway for now, but they've plans to add it
probably the CPU is saturated, nodejs is single-thread anyway
@ThallesComH I have a question regarding this
How to determine how many replicas would be needed to scale the application
I like to do benchmark using oha with a traffic that I expect