Best way to manage prices using the Railway API for large projects and how to do it

Hello,

I work for a company that is considering using Railway for hosting applications. Long story short, our product is an app for building apps so our clients need a way to quickly host them in the cloud. It could be 100s of applications and we want to figure out the best wat to structure all of this using Railway.

This is what we planned out so far:

Have the following structure in the Railway cloud:

  1. A single large workspace that we can call "MyCompany's Cloud": All client resources and projects will reside in this workspace.
  2. Within the workspace, a project for each client: Each client would have their own dedicated project with an associated spending limit.
  3. Applications and databases within client projects: Within each client project, their specific applications and associated databases.

Everything needs to be done via API and/or CLI programatically, as we can't be manually creating, deleting and monitoring each application.

Here are my questions:

  1. Is the plan we currently have the most optimal configuration possible on Railway?
  2. How would one monitor prices per project there? Doing reaserch I could not find any API endpoint that sets a spending limit to a given project. Ideally, we would like each project to have a monthly spending limit.
  3. How would one monitor usage? Doing reaserch I could not find any API endpoint that checks if an app is not being used so I can delete it

This is the API reference I've been using: https://www.postman.com/railway-4865/railway/collection/adgthpg/railway-graphql-api

Solved

3 Replies

  1. We would totally prefer that you are on the Pro for this type of studd.
  2. We don't offer this an API.
  3. You can use the metrics endpoint to monitor usage.

Status changed to Awaiting User Response Railway about 1 year ago


This is just my personal account, if Railway is chosen as cloud provider for our software we will definately create an account with a Pro or Enterprise subscription.

Ok, so if I understood this right: The structure I presented is indeed the optimal way to achieve what we want to achieve right? And right now there is no way to set monthly spending limit via API but we can monitor the usage of each project via API. The only this I'm missing is how do we translate from the usage metric returned by the API to money being charged to our card?


Status changed to Awaiting Railway Response Railway about 1 year ago


echohack
EMPLOYEE

a year ago

Hey tomas,

We do have usage limits you can set: https://docs.railway.com/reference/usage-limits#hard-limit

More importantly, I think given the scale what you want to achieve that we'd have a better discussion on a call instead of in a support thread.

You can schedule some time with us here: https://cal.com/team/railway/work-with-railway?duration=30


Status changed to Awaiting User Response Railway about 1 year ago


Railway
BOT

9 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...