a year ago
I'm exploring Railway for a project where I need to dynamically spin up and down containers on a per-user basis.
You're looking at a worker-queue desgin, and each user would get their own isolated container environment(s) that can be started as their queues fill up.
Some specific questions I have:
Is there a hard limit on the number of containers/services I can run simultaneously on Railway?
Can I programmatically create, start, and stop containers via an API?
Would Railway's pricing model work for this kind of dynamic scaling where containers might be frequently started/stopped?
Are there any architectural recommendations or limitations I should be aware of for this use case?
I'd appreciate any guidance on whether this approach is feasible with Railway or should I go with Kubernetes
13 Replies
a year ago
As long as you're paying your bills, as far as I know no.
Yes, using the Railway CLI https://docs.railway.com/guides/cli
Define work? You are charged based on CPU, RAM, Networking, and Storage. The first 3 will only charge while the container is active, Storage will charge as long as you have an active volume.
It's your project, you'll have to make the decisions there
a year ago
and hey, as mentioned on the <#727689277219012669> I would recommend doing by project.
projects contains a limit of 100 per service, projects seems to be infinite.
Thanks,
as @Brody mentioned there's a limit of 100 services per project. Should I create a new project on a per-user-signup basis to preallocate a dedicated worker containers? in this case, am I going to hit a wall in max number of projects per billing account?
a year ago
There is no limit of projects by billing account. And again, do not ping the team or conductors
a year ago
At this point, it would be best for you to build out a POC so you can understand the platform limitations for yourself.
a year ago
You will not run into the project limit for a POC, so you will cross that bridge when you get to it
a year ago
ideally, you dont build a product that requires spot instances per user, its just not easily scalable, but if you have to do it, yes you would need to do it in a new project for every user.
I get you on that one - the only alternative is running docker-in-docker for sharing a resource pool. But im happy to hear project limitations won't be a concern.
if Railway also does well at image caching on its own container registry servers, and can achieve fast container spin-up times, I can actually see this working out well
Hey teo, I'd also recommend you reach out to us via https://railway.com/pricing#, especially once you've had a chance to test out the platform a bit for your use case.
I think with this level of activity we'd be interested in finding more out about your use case. Let us know!
FYI already hit the first unpleasant wall :/
ValueError: GraphQL Error: Whoa there pal! Only one project can be created per user every 30s. Try again in a sec
These are all limits that we can move, but we need to find out more about your use case. Can you reach out to us?
@teocns looking forward to chatting Tuesday. Any more info you can provide would be great - email or here works well.
@echohack and I will make sure we’ve gone through it ahead of Tuesday.