#Feasibility of Per-User Dynamic Container Architecture on Railway

14 messages · Page 1 of 1 (latest)

hexed perch
#

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

vale sirenBOT
#

Project ID: N/A

hexed perch
#

N/A

paper night
#
  1. As long as you're paying your bills, as far as I know no.
  2. Yes, using the Railway CLI https://docs.railway.com/guides/cli
  3. 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.
  4. It's your project, you'll have to make the decisions there
languid willow
#

and hey, as mentioned on the #🎤|chit-chat I would recommend doing by project.
projects contains a limit of 100 per service, projects seems to be infinite.

hexed perch
#

Thanks,
as @tired moss 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?

paper night
#

There is no limit of projects by billing account. And again, do not ping the team or conductors

#

At this point, it would be best for you to build out a POC so you can understand the platform limitations for yourself.

#

You will not run into the project limit for a POC, so you will cross that bridge when you get to it

tired moss
#

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.

hexed perch
#

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

empty finch
#

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!

Railway

Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.

hexed perch
#

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

empty finch