Hobby service feasibility for an isolated, bounded PostgreSQL benchmark
electrodrive-oficial
PROOP

a month ago

We are assessing a single isolated PostgreSQL benchmark on Railway Hobby. Please do not provision or change anything. We need supported mechanisms; please identify any requirement that cannot be met on Hobby.

The proposed job uses one replica, 2 vCPU, exactly 8,000,000,000 bytes of memory, swap disabled, an ephemeral PostgreSQL 16 database, no automatic retries and a maximum of 24 hours including setup and cleanup. These are maximum limits, not a request for dedicated CPU performance. A restart or host migration would invalidate the run; we are not asking to opt out of mandatory migrations.

Could you clarify these three areas and point to the supported configuration/API and observable evidence for each? If a requirement is unsupported, please say so.

  1. Execution identity, executable protection and worker network isolation.

Can an external controller bind the exact running instance/deployment to its image and protect the executable files from changes for the duration of the job (read-only executable mount/root or an equivalent supported mechanism)? A reported image digest alone would not prove runtime file immutability.

Can outbound traffic from the benchmark worker be denied except for loopback, while keeping a separate authenticated control/evidence channel? We must not rely merely on the absence of public ingress or on not storing provider keys.

  1. Bounded termination of only this job.

What supported operation lets an external controller stop this exact job and all of its descendants as one scope, including processes in other process groups? What can the controller observe to confirm that the entire scope is gone and that it was not automatically restarted/replaced? Does removing a deployment provide these guarantees?

The termination operation must be scoped to this job, not the workspace. If a narrower job/cgroup primitive exists, please identify it and whether it is available to Hobby services.

  1. Effective resource limits and attributable cost.

Can the controller verify the effective CPU/memory/swap limits and actual available ephemeral storage for that job? We need 63 GiB total scratch, of which 28 GiB is evidence, not an additional persistent volume. Services docs state 100 GB ephemeral storage for paid plans; what is the supported way to verify the applicable limit and usable space, rather than the backing host's free space?

What usage/cost API or metrics can attribute BEFORE/AFTER usage to this exact run without mixing usage from other services? Please specify granularity, update delay, finalization and any additional controller/storage/export costs.

If an external controller is necessary, please identify the supported interfaces and scope required. This is a feasibility inquiry only, not a request to provision resources or change configuration.

Duplicate$10 Bounty

7 Replies

Railway
BOT

a month ago

Several of these requirements cannot be met on Railway (any plan). There is no supported mechanism for a read-only root filesystem or runtime executable immutability, and no per-service egress firewall or outbound-deny rule exists: all containers have unrestricted outbound internet access. Railway does not expose container security contexts, cgroup primitives, or swap configuration to users.

For termination, setting the restart policy to "Never" prevents automatic restarts, and removing a deployment via the dashboard or the public API stops the container with SIGTERM then SIGKILL. The deployment status transitions to REMOVED, observable via the API. However, there is no exposed job-scope or cgroup primitive, and Railway does not provide a guarantee that all descendant processes in other process groups are terminated as one atomic scope.

For resource limits, Hobby supports up to 8 GB RAM and 2 vCPU per replica (configurable via replica limits in service settings), with 100 GB ephemeral storage. Your 63 GiB scratch fits. Standard tools like df inside the container report usable space, but there is no Railway API to verify the effective ephemeral limit or confirm swap is disabled. Billing is per-service (vCPU-minutes, MB-minutes, egress), visible in the dashboard metrics and on Stripe invoices, but is not broken down per deployment, and update delay is end-of-cycle finalization with no real-time per-deployment cost API.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway

Several of these requirements cannot be met on Railway (any plan). There is no supported mechanism for a read-only root filesystem or runtime executable immutability, and no per-service egress firewall or outbound-deny rule exists: all containers have unrestricted outbound internet access. Railway does not expose container security contexts, cgroup primitives, or swap configuration to users. For termination, setting the restart policy to "Never" prevents automatic restarts, and removing a deployment via the dashboard or the [public API](https://docs.railway.com/integrations/api/manage-deployments) stops the container with SIGTERM then SIGKILL. The deployment status transitions to REMOVED, observable via the API. However, there is no exposed job-scope or cgroup primitive, and Railway does not provide a guarantee that all descendant processes in other process groups are terminated as one atomic scope. For resource limits, Hobby supports up to 8 GB RAM and 2 vCPU per replica (configurable via replica limits in service settings), with 100 GB ephemeral storage. Your 63 GiB scratch fits. Standard tools like `df` inside the container report usable space, but there is no Railway API to verify the effective ephemeral limit or confirm swap is disabled. Billing is per-service (vCPU-minutes, MB-minutes, egress), visible in the dashboard metrics and on Stripe invoices, but is not broken down per deployment, and update delay is end-of-cycle finalization with no real-time per-deployment cost API.

electrodrive-oficial
PROOP

a month ago

Thanks. Could Railway staff clarify the remaining points? The automated answer has some discrepancies with the published documentation, so we are not treating it as a confirmed feasibility decision.

  1. Hobby limits: https://docs.railway.com/deployments/troubleshooting/slow-deployments lists 8 vCPU / 8 GB per replica. Our 2 vCPU value is the selected test profile, not a claimed plan maximum.

  2. Termination: https://docs.railway.com/integrations/api/manage-deployments distinguishes deploymentStop (stop a running deployment) from deploymentRemove (remove from history). Which operation provides the required complete job shutdown, and what completion evidence covers all descendant processes? We understand the Never restart policy; it does not answer the full-scope completion question.

  3. Usage and storage: https://docs.railway.com/cli/usage and https://docs.railway.com/projects/project-usage describe current/historical costs by service. For a dedicated single-run service, what is the supported attribution window, update lag and finalization rule? Monthly invoice settlement is not necessarily the same as measurement availability. Also, please confirm how to verify the per-deployment ephemeral quota; host filesystem free space from df does not by itself establish that quota.

Finally, please confirm whether runtime executable protection, worker outbound denial and verifiable swap limits are unsupported, or identify supported mechanisms. We are not asking for a workaround that bypasses platform restrictions. No provisioning or configuration changes are requested.


Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

Hobby per-replica limits are 8 vCPU / 8 GB as you cited; the plan table's larger figures (48 vCPU / 48 GB) are per-service maximums including replica multiplication, so your 2 vCPU / 8 GB profile fits.

For termination, use deploymentRemove, not deploymentStop. deploymentStop writes no status transition (deployment stays SUCCESS), providing no completion evidence. deploymentRemove drains with SIGTERM, escalates to SIGKILL after the configured draining period, removes the container, and transitions the deployment through REMOVING to REMOVED via the public API. Removing the container tears down its PID namespace and cgroup, so every process dies regardless of process group. The SIGTERM-to-SIGKILL window is configurable via RAILWAY_DEPLOYMENT_DRAINING_SECONDS (default 0). Restart policy set to Never prevents automatic replacement.

Usage is metered per minute and attributed per service via railway usage and the workspace usage page. For a dedicated single-run service all usage is attributable to that run, but there is no per-deployment breakdown; finalization is end-of-billing-cycle.

Confirming the unsupported items: read-only root filesystem, outbound traffic denial, verifiable swap configuration, a Railway API for the effective ephemeral-storage quota or cgroup limits, and per-deployment cost attribution are all unsupported on any plan. Container tools (df, cgroup pseudo-files) read the container's view, not a Railway-attested quota. Railway-initiated restarts for host migrations are mandatory on all plans.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway

Hobby per-replica limits are 8 vCPU / 8 GB as you cited; the plan table's larger figures (48 vCPU / 48 GB) are per-service maximums including replica multiplication, so your 2 vCPU / 8 GB profile fits. For termination, use `deploymentRemove`, not `deploymentStop`. `deploymentStop` writes no status transition (deployment stays SUCCESS), providing no completion evidence. `deploymentRemove` drains with SIGTERM, escalates to SIGKILL after the configured draining period, removes the container, and transitions the deployment through REMOVING to REMOVED via the [public API](https://docs.railway.com/integrations/api/manage-deployments). Removing the container tears down its PID namespace and cgroup, so every process dies regardless of process group. The SIGTERM-to-SIGKILL window is configurable via `RAILWAY_DEPLOYMENT_DRAINING_SECONDS` (default 0). Restart policy set to Never prevents automatic replacement. Usage is metered per minute and attributed per service via `railway usage` and the workspace usage page. For a dedicated single-run service all usage is attributable to that run, but there is no per-deployment breakdown; finalization is end-of-billing-cycle. Confirming the unsupported items: read-only root filesystem, outbound traffic denial, verifiable swap configuration, a Railway API for the effective ephemeral-storage quota or cgroup limits, and per-deployment cost attribution are all unsupported on any plan. Container tools (`df`, cgroup pseudo-files) read the container's view, not a Railway-attested quota. Railway-initiated restarts for host migrations are mandatory on all plans.

electrodrive-oficial
PROOP

a month ago

Thank you. Could a Railway staff member confirm the remaining points, please? The latest reply is still explicitly labeled as automated. We have not started the benchmark and are not requesting provisioning or configuration changes.

  1. For a standard Railway service, are read-only runtime executables, worker outbound-deny except loopback, and verifiable swap/effective ephemeral-storage limits unsupported? If so, staff confirmation is sufficient: we will treat those prerequisites as unmet, not seek an unsupported workaround.

  2. Is REMOVED after deploymentRemove supported evidence that this specific deployment container and all of its descendant processes have terminated, rather than only a history/status update? Please confirm the scope of that completion signal and any exceptions to Never preventing automatic replacement. We understand that mandatory host migrations are a separate platform event.

  3. For service-level usage, what is the typical or maximum publication delay while the job is running? After removal, when can late usage be considered complete, independently of monthly invoice settlement? If no bounded delay is provided, please state that. We need to distinguish one-minute metering granularity from when that measurement becomes available.

The hardware ceiling is clear; no further clarification or plan change is requested on that point. Thank you.


Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

Confirming the unsupported items: read-only runtime executables, worker outbound-deny except loopback, and verifiable swap/effective ephemeral-storage limits are all unsupported on any plan and not available on request.

REMOVED after deploymentRemove is completion evidence, not only a history update. It is written after teardown completes: removing the container destroys its PID namespace and cgroup, so every process inside dies regardless of process group or parentage. The restart policy Never prevents automatic replacement; the only things that can still create a new deployment under that service are a Railway-initiated host migration (which you have already accounted for) and a new deployment explicitly triggered by you or your CI.

To correct my earlier replies on usage attribution: the public GraphQL API's metrics and usage queries both accept DEPLOYMENT_ID in their groupBy, so per-deployment CPU, memory, and network attribution is supported without dedicating the service to a single run. The metrics query also exposes CPU_LIMIT and MEMORY_LIMIT_GB measurements, which report the limits Railway applied to the container rather than the container's own self-read. Swap and the ephemeral ceiling remain unverifiable. For publication delay, no bounded or maximum figure is published. In practice a running workload's usage becomes visible within a few minutes. Once a deployment reaches REMOVED it produces no further samples, so polling the deployment's window until the total stabilizes is a sound completion rule on your side. End-of-cycle invoice finalization is a billing step, not a re-measurement.


Status changed to Awaiting User Response Railway • about 1 month ago


electrodrive-oficial
PROOP

a month ago

Thank you. This adds a potentially useful supported path, but the response is still labeled automated. Could a Railway staff member confirm it and provide the exact official GraphQL schema/reference and a minimal query example for metrics and usage grouped by DEPLOYMENT_ID, including the precise measurement names (CPU_LIMIT, MEMORY_LIMIT_GB), units, timestamps/granularity, retention after REMOVED, and which billable dimensions are included? Please also clarify the completion rule: if publication delay has no documented upper bound, a total being stable for an arbitrary polling interval cannot prove that late samples will not arrive. Is there a supported final/completeness signal or conservative documented window after REMOVED; if not, please confirm that no bounded completeness guarantee is available. No provisioning or configuration changes are requested.


Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


electrodrive-oficial
PROOP

a month ago

Hello Railway team,

Our workspace has now been upgraded to Pro. Could a Railway support engineer please review this existing thread? We are asking about supported platform mechanisms, not application-code debugging.

The outstanding points are:

  1. The supported APIs and observable completion signals for stopping this exact deployment and all its descendants, and for cancelling a build or queued deployment.

  2. Whether standard Services on Pro support the runtime executable protection, outbound restriction and verifiable swap/ephemeral-storage limits described above. If unsupported, an explicit confirmation is sufficient; we are not requesting a workaround.

  3. The exact metrics/usage schema for per-service or per-deployment attribution, and whether any supported signal or documented window establishes that delayed usage is complete after shutdown. Please distinguish running-resource costs from build/preparation charges.

Please assess the current Pro plan. Our selected test profile remains 2 vCPU / 8 GB; the upgrade is not a request to resize anything.

No benchmark has been launched. Please do not provision, restart, redeploy, resize or change any service, networking or security setting. We only request technical clarification.

Thank you,

Mauro


Status changed to Duplicate brody • 25 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...