Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Railway 7 min read Announcement mediumAdept

So You Think You Can Scale?

Railway services can now be horizontally scaled with a single replica-count setting, with automatic load balancing over public and private networks, failover between replicas, and replicas spread across multiple machines. Under the hood, a Temporal-based orchestrator extends the data model to multiple deployment instances per service and fans out sub-workflows to place containers on hosts, using healthchecks to confirm readiness. Each replica gets a unique IPv6 address pushed through an event-based gRPC control plane, so private DNS returns multiple AAAA records for random load balancing, while public ingress uses round-robin via Envoy proxies updated through CDS. Custom autoscalers can be built today on the GraphQL metrics and replica APIs; multi-region failover, built-in autoscaling and scale-to-zero are planned.

Assumes: load balancing basicsDNS recordscontainer orchestration

Related posts

  • Hello, World: We’re Railway

    Railway mediumAdept

    Railway launches US-East, EU-West and Southeast Asia regions alongside its original US-West GCP zone, with one-click region moves that need no URL or DNS changes. Getting there required several building blocks: private networking built on a WireGuard mesh with eBPF NAT and per-project IPv6 /64 address spaces, a global edge that splits Envoy edge proxies from regional routing proxies behind GeoDNS, and lazy-loading L4 TCP proxies that subscribe to a memdb-backed control plane for cache invalidation. Volumes use ZFS send/receive snapshots, orchestrated with Temporal, to move databases across regions with minimal downtime. The team also restructured a copy-pasted, module-less Terraform and Ansible stack so new regions are cheap to add.

  • How to Deploy and Scale Docker Containers on Railway in 2026

    Railway mediumAdept

    Docker containers on Railway can be deployed either by having Railway build from a Dockerfile (via BuildKit with cache mounts, configurable with RAILWAY_DOCKERFILE_PATH) or by pulling a pre-built image from a registry such as Docker Hub, GHCR or ECR Public. Services must bind to 0.0.0.0 (or :: for the IPv6 private network) and honor the PORT variable. Layer ordering, .dockerignore and multi-stage builds keep rebuilds cheap. Scaling is vertical via resource limits or horizontal via replicas across regions, but services with Volumes cannot use replicas, so state belongs in databases or object storage. Billing is usage-based ($10/GB RAM, $20/vCPU per month), and a small always-on API works out to roughly $6.50/month.

  • Scaling a SaaS application on Railway

    Railway mediumAdept

    A Remix and PostgreSQL job board on Railway is scaled up with a staging environment tied to a `stage` branch, automatic vertical scaling, and horizontal replicas. Replicas cannot be added while the service uses a persistent volume, so file uploads move to a self-hosted, S3-compatible MinIO bucket and resume downloads are served through pre-signed URLs. Costs are cut by caching job detail pages for an hour at Cloudflare using a Remix `Cache-Control` header plus a Cloudflare cache rule, sleeping the staging app when idle, and using private networking to avoid egress fees.

  • Disaggregated Scheduled Fabric: Scaling Meta’s AI Journey

    Meta Engineering hardMaster

    Meta's Disaggregated Scheduled Fabric (DSF) splits a chassis switch into separate interface nodes (Jericho3-AI RDSWs) and fabric nodes (Ramon3 FDSWs) running FBOSS. Together they act as one virtual switch that sprays packets as cells across all fabric paths, using VOQ and credit-based scheduling to fix the elephant-flow, low-entropy and skewed-utilization problems that RDMA training traffic causes on hash-based Clos/ECMP fabrics. Meta scaled it from L1 zones to a non-blocking L2 zone of 18K x 800G GPUs, then joined five L2 zones through an oversubscribed (4.5:1) L3 super-spine using iBGP add-path and eBGP. Input Balanced Mode handles remote link failures by withdrawing reachability on randomly chosen links so that input bandwidth never exceeds output bandwidth anywhere in the fabric.

  • Railway vs Cloudflare: How Their Architectures Differ and When to Use Each

    Railway mediumAdept

    Railway and Cloudflare's Developer Platform feel similar on the surface but rest on opposite compute models. Railway runs long-lived regional containers with stable in-memory state, persistent volumes and up to 32 vCPU/32 GB per instance. Cloudflare Workers are edge-first, single-threaded V8 isolates capped at 128 MB memory and CPU-time limits, with no filesystem or reliable global state, so state needs Durable Objects, KV, D1, R2 or external databases via Hyperdrive. The recommended pattern is to combine them, with Cloudflare as the global front door (CDN, caching, routing, security) and Railway hosting stateful backends, databases and long-running work.

The quest for software engineering knowledge.

Look:
Layout: