Railway review for a web app, worker, and PostgreSQL

Railway review for a web app, worker, and PostgreSQL

Dreamstack Team
Dreamstack Team
· 5 min read

Disclosure: Dreamstack offers competing cloud hosting. This AI-assisted review evaluates provider documentation and published pricing. Workload examples are illustrative.

Railway makes a good first home for the kind of application that has just outgrown a single process. Imagine a customer clicking Export. A web service records the request, a worker prepares the file, and PostgreSQL remembers which customer should receive it. The useful thing about Railway is that these pieces can live together in one project while starting, stopping, and deploying separately. The decision that deserves more attention is which of them owns data you cannot recreate.

Follow an export through the project

Give the API and worker separate start commands, even if both come from the same repository. The API can commit an export request and return a job ID. The worker can claim that ID, produce the file, and record its location. Both services can reference the database’s connection variables. Railway provides private service discovery within an environment, so there is little reason for the worker to reach the database through a public TCP proxy. An external SQL client is a different case, and traffic through that proxy can incur egress charges. Private networking · Railway PostgreSQL

This arrangement earns its keep when exports get slow. A worker release can change how files are generated while the API continues to accept requests. Put finished files somewhere both services can reach, such as object storage. A pathname in the worker’s container is a poor receipt to hand back to the web service.

Where attaching a volume changes the deal

A tempting shortcut is to mount a volume on the web service and save each export there. Railway documents two consequences. A volume-backed service cannot use replicas, and the old and new deployments cannot mount the same volume simultaneously. A redeploy therefore introduces an interruption. A successful startup health check still helps with readiness, but that check runs during deployment and does not continuously monitor the service afterward. Volume limitations · Health checks

The PostgreSQL template starts with a single node. Railway also documents a high-availability upgrade with automatic failover. Decide separately how you would recover yesterday’s export records after an accidental change. Native volume backups can be scheduled, but their restore destination is restricted to the same project and environment. If your recovery plan calls for a clean, separate project, rehearse a logical backup there. Our PostgreSQL restore drill includes a record you can check after recovery. Database options · Backup and restore restrictions

What the monthly minimum buys

Railway lists Hobby at $5 a month and Pro at $20 a month, with the subscription amount applied toward eligible usage. On Hobby, $3 of eligible usage still leaves a $5 bill. At $12 of eligible usage the calculation comes to $12 before taxes or extras. For an export service, the inputs to estimate are the memory of the API, worker, and database over time, CPU consumed while generating files, stored data, and outbound transfers. A quiet worker can still occupy memory. Railway plans and resource prices

If continuous instance health checks are a requirement, compare how Render handles health after a release.

Who should shortlist it? A small team that wants an API, worker, and database in one project and can explain how each recovers. Before moving customers, queue one sample export, redeploy the worker while it is processing, and check that the customer receives one usable file. Then restore one database record in the location your recovery plan promises. Those two results tell you more about the fit than the time it takes to get a welcome page online.

Top comments (0)

❤️ 0
🦄 0
🔥 0
🙌 0