Skip to content

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

Railway 17 min read Case study mediumAdept

Hello, World: We’re Railway

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.

Related posts

  • How we built multi-region support for Linear

    Linear mediumAdept

    Linear added an EU region by replicating its entire production deployment per region rather than sharding the database, keeping each region isolated and letting engineers keep writing against a single Postgres instance. The work came in three phases: Terraforming the previously hand-managed GCP infrastructure into region-parameterized modules, extracting a global authentication service that owns users, workspaces and their region mapping, and putting a Cloudflare Workers proxy in front of all traffic to route requests to the right region with a signed JWT. Shared records are created and deleted in the auth service first so uniqueness holds globally, updates propagate asynchronously through the sync engine, cross-service calls flow one way (auth to regions via Pub/Sub), and background jobs reconcile the two sides. Fallbacks and feature flags kept cut-overs late and mostly invisible to users.

  • 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 Future of Databases is Services

    Railway easyNovice

    Railway replaced its bespoke per-database Plugins (Postgres, Redis, Mongo, MySQL) with databases deployed as ordinary services, built from general-purpose primitives: ZFS-backed NVMe volumes, Docker image deploys, port-based TCP proxies per region, private networking, cross-service variable references, and a `${{ secret() }}` template function for generated passwords. Because TCP carries no Host header, the proxy routes by assigning a unique port per service. Combined into one-click templates, these primitives let users deploy any database, such as PGVector, Chroma, ClickHouse or Temporal, and Railway plans to add backups and high availability the same way.

  • Self-service regional failover with Amazon Application Recovery Controller Region Switch and centralized ingress controls

    AWS Architecture Blog mediumAdept

    Application teams in regulated enterprises can run self-service multi-Region failover behind a centralized ingress proxy fleet by owning a Route 53 Private Hosted Zone failover recordset while a central team owns peered Transit Gateways and VPC attachments. ARC Region Switch plans then orchestrate database promotion, compute scaling, health-check flips and Lambda steps from the recovery Region without coordinating with infrastructure teams. VPC Lattice service network endpoints allow per-service failover, which carries a risk of bi-modal behavior and cross-Region latency. A central parent plan shared via AWS RAM can run child plans in dependency order for portfolio-level recovery. The pattern accepts an extra cross-Region Transit Gateway hop in exchange for team autonomy, and real DR invocations should use the API or CLI rather than the console.

  • So You Think You Can Scale?

    Railway mediumAdept

    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.

The quest for software engineering knowledge.

Look:
Layout: