R
Railway•9mo ago
justjumper

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
Percy
Percy•9mo ago
Project ID: 82091a0b-2976-40b9-bb0f-784a7f99567f
justjumper
justjumper•9mo ago
82091a0b-2976-40b9-bb0f-784a7f99567f
Fragly
Fragly•9mo ago
Autoscaling should be enabled by default 🤔 well it's not even an option
ThallesComH
ThallesComH•9mo ago
are you sure that it's server overloaded thing?
ThallesComH
ThallesComH•9mo ago
Railway Docs
Services | Railway Docs
Documentation for Railway
justjumper
justjumper•9mo ago
We're on the Pro plan Hmm
justjumper
justjumper•9mo ago
No description
justjumper
justjumper•9mo ago
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
ThallesComH
ThallesComH•9mo ago
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
sam-developer
sam-developer•9mo ago
@ThallesComH I have a question regarding this How to determine how many replicas would be needed to scale the application
ThallesComH
ThallesComH•9mo ago
I like to do benchmark using oha with a traffic that I expect