How to build a 30M RPS CDN in 30 days with Rust and WASM
Railway built Hikari, its own CDN with 60 POPs and 180+ nodes, in 30 days. It serves ~1M RPS at peak, has absorbed 30M RPS DDoS attacks, and benchmarks to ~150M RPS. The design centers on safe deployment: a Rust reconciliation-loop sidecar (hikari-keeper) replaces Ansible for node config, BGP announcement and fd-handoff binary upgrades, while per-request business logic runs as versioned wasmtime/WASI guests that can be swapped in seconds without dropping connections. It also covers anycast routing pitfalls with global transit networks, mitigated by BGP community tagging, and a thread-per-core tokio design with thread-local warm guest pools that avoids the ~10μs cold-instantiate cost and cross-core contention.
Related posts
- Railway vs Cloudflare: How Their Architectures Differ and When to Use Each
Railway mediumAdeptRailway 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.
- Workflow SDK 5: built for production
Vercel mediumAdeptWorkflow SDK 5 reworks Vercel's durable async JavaScript workflow engine around security, regional placement and performance. Step payloads are now encrypted end to end with AES-256-GCM using per-run keys. On self-hosted Worlds, encryption works through a getEncryptionKeyForRun() hook. Runs are pinned to a home region chosen at start(). The engine executes multiple steps inline instead of taking a queue hop per step, replays incrementally, and streams over WebSockets. Benchmarks against v4 show p75 step-to-step overhead dropping from 618 ms to 109 ms, late-run overhead in a 1,020-step workflow falling from 1,748 ms to 70 ms, and stream delivery time improving 4.2×.
- Hello, World: We’re Railway
Railway mediumAdeptRailway 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.
- Incident Report: October 16th, 2025
Railway easyNoviceA traffic spike on Railway's Edge Network coincided with a routine edge service upgrade and exhausted memory in an internal routing service that was already running at high utilization. New proxies could not initialize, failed health checks and were pulled by load balancers, causing 2-3 minutes of intermittent HTTP/TCP failures (404s, 522s) across all regions while private networking stayed unaffected. Recovery came as caching absorbed the load. Fixes include higher memory limits, tiered memory alerts and overload safeguards, with a memory-efficient rewrite and a multi-region architecture planned to isolate failures per region.
- Going multi-cloud with an in-housed status page
Railway mediumAdeptRailway built its own status page, hosted on Railway itself, behind a Cloudflare Worker so the public page survives an origin outage. The Worker acts as a transparent proxy with its own stale-while-revalidate layer: it stamps cached responses with an x-cached-at header, refreshes in the background after 5 seconds, and serves the last good render for up to a week if origin disappears. During real incidents a Cloudflare KV flag switches the Worker to serve a self-contained incident page that on-call can edit live, while JSON pollers still get JSON. The page also adds a "Notice" state that acknowledges an issue before it is declared an incident, and the same distributed-routing approach now backs Railway's multi-region network plane.