how does railway scale down?

Does anyone know if railway will destroy my running containers when scaling down. This helps me know if this is a solution that will work for apps using websocket connections.
44 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Web Dev Cody
Web Dev CodyOP3y ago
Could you explain what you mean? They talk about scaling up to handle more load in the docs I thought
Finn
Finn3y ago
On the Dev plan your project is seed onto a host with alot of resources depending on the projected usage, you can use upto 8gb of ram on the Dev plan for example
nebula
nebula3y ago
vertically not horizontally
Finn
Finn3y ago
Ye On teams plan, do you get a dedicated host?
nebula
nebula3y ago
you can get up to 96vcpu and 256gb ram so i think so
Web Dev Cody
Web Dev CodyOP3y ago
So everything on railway is scaled vertically?
Finn
Finn3y ago
Dam, how does pricing work on that For now yeah Wyz has a little project that uses the internal API to scale but it's very experimental
Web Dev Cody
Web Dev CodyOP3y ago
How does that work for node apps? Do you run them using pm2 or some type of clustering?
Finn
Finn3y ago
You just right click on your project and import your repo to add more services
nebula
nebula3y ago
wdym
Finn
Finn3y ago
Some customers use envoy / nginx to proxy traffic between multiple services
nebula
nebula3y ago
we run all services as containers
Web Dev Cody
Web Dev CodyOP3y ago
If I want to host a next app with 96vcpu, node is single threaded and won’t even use those resources, next needs to be scaled horizontally to actually work well
Finn
Finn3y ago
Like you can run your website multiple times project to scale horizontaly But it's very much a bad experience rn
nebula
nebula3y ago
yeah horizontal scaling is in the works 😁
Finn
Finn3y ago
Vercel is better and cheaper for frontends tbh
nebula
nebula3y ago
yeah we rec vercel for next tbh
Web Dev Cody
Web Dev CodyOP3y ago
Yeah but I wanted websockets support, I don’t want edge or lambda api endpoints Vercel doesn’t support websockets from what I hear
nebula
nebula3y ago
ah
Finn
Finn3y ago
Yep, so you can manually spin up multiple instances of your website in a single project But it's all very manual atm
nebula
nebula3y ago
tbh you only need like one instance unless you have a massive userbase
Web Dev Cody
Web Dev CodyOP3y ago
Can I specify the max resource usage on the instance or does it just scale the container as needed?
Finn
Finn3y ago
Nope You can use as much as you want ( within the limit of your account tier ) (starter, Dev, and teams) So there's no need to manually adjust resource values If that makes sense
Web Dev Cody
Web Dev CodyOP3y ago
Kind of, so if I have 8 different services running on my developer plan, does that mean each 8 services are capped at max 8gb or ram? Or is that 8gb shared for all 8 services?
Finn
Finn3y ago
That I don't know. I think it's per project like the 100gb of disk but I'm not sure N*b any ideas? Oh also if you insert cc the 500 a month limit is removed No extra cost below 5 quid a month
Web Dev Cody
Web Dev CodyOP3y ago
Sorry for so many questions. I guess I’m just curious if I was going for a microservice approach, I don’t want 1 service alone consuming all the memory on an account limit causing my other services to be throttled or die. The docs really don’t explain much imo
Finn
Finn3y ago
Nah your good bro But yeah, if the 8gb is not enough, be it shared or per service the teams plan is 20 quid and you get 32 GB of ram and 32 vcpu Tbh based of that I would expect it to be per service As 32gb of ram would not be enough for big customers
Web Dev Cody
Web Dev CodyOP3y ago
I think the wording here explains the limits. Each service (container) is capped at 512mb. The conflation of terminology between container and service is a bit confusing. Both my Postgres and next deployment are called services in the UI, but billing says container
nebula
nebula3y ago
a service is a description for creating containers ig services have metadata and spawn containers containers are where the code actually runs
Rumon
Rumon3y ago
The resources are shared across all of your running projects.
Finn
Finn3y ago
oh interesting? so you can only use 32gb on the teams plan?
Rumon
Rumon3y ago
Okay hold on. Now that I double-checked it, it's per container / service. So on Developer plan, you'll 8GB limit for each of your services.
Finn
Finn3y ago
oohh where was that info btw
Rumon
Rumon3y ago
On the pricing page. It says: "Up to 8 GB RAM and shared CPU / container". That line break may seem to be confusing. mildpanic
Finn
Finn3y ago
oh yea i see that
Web Dev Cody
Web Dev CodyOP3y ago
Ok so it basically spins up a docker container with max memory set to 8gb
Finn
Finn3y ago
kinda yeah
Finn
Finn3y ago
it useses https://nixpacks.com to make builds fast asf to
Getting Started | Nixpacks
App source + Nix packages + Docker = Image
Rumon
Rumon3y ago
Technically, no. Then they'd straight charge you for that 8GB reservation.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Web Dev Cody
Web Dev CodyOP3y ago
right, so they probably monitor your container mem usage, and charge you based on that usage but the container still probably has a max set to 8gb or they just monitor your container and docker update it to more memory as they see it increase in memory
Rumon
Rumon3y ago
That was what I was saying. Railway must not provision all 8GB to the service. It starts with maybe 1GB / 2GB, and instantiate more containers if required.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server