How to build a 100M RPS CDN in 30 days with Rust and WASM

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

Railway built its own CDN called Hikari from scratch in 30 days using Rust and WASM/WASI, now serving 100% of customer traffic. The system spans 60+ POPs with 180+ nodes, each with 16-core EPYC CPUs, 256GB RAM, and 100G networking. Key architectural decisions include: using WASI/wasmtime to run per-request business logic (WAF rules, caching decisions) as versioned WASM guest binaries that can be hot-swapped without dropping connections; a thread-per-core tokio model with thread-local WASM instance pools to avoid cross-core cache contention; a reconciliation-loop-based deployment system via a sidecar called hikari-keeper; and BGP anycast with community tagging for traffic engineering. Railway's unique advantage is operating both edge and origin, enabling precise routing and automatic HTML cache purging on deploy.

13m read timeFrom blog.railway.com
Post cover image
Table of contents
We had to build this ourselvesHow we built and deployed Hikari in 30 days
33.4K Impressions