---
title: "How to build a 30M RPS CDN in 30 days with Rust and WASM"
description: "Railway built Hikari, its own CDN with 60 POPs and 180+ nodes, in 30 days."
url: "https://swe.quest/articles/how-to-build-a-30m-rps-cdn-in-30-days-with-rust-and-wasm-874ba9ecc2d85852"
canonical: "https://blog.railway.com/p/railway-cdn"
source: "Railway"
published: "2026-06-04"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["cdn-edge","webassembly","rust","networking","deployment"]
---

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

A post on [Railway](https://swe.quest/sources/railway.md), published 2026-06-04, 12 min read, Case study. Original: [https://blog.railway.com/p/railway-cdn](https://blog.railway.com/p/railway-cdn)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CDN & edge](https://swe.quest/tags/cdn-edge.md) (Infrastructure)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- BGP and anycast basics ([easy posts on Networking](https://swe.quest/tags/networking.md?difficulty=easy))
- WebAssembly/WASI ([easy posts on WebAssembly](https://swe.quest/tags/webassembly.md?difficulty=easy))
- async Rust with tokio ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))
- CDN caching concepts ([easy posts on CDN & edge](https://swe.quest/tags/cdn-edge.md?difficulty=easy))

## Keywords

Hikari, Railway, wasmtime, WASI, BGP anycast, BIRD, tokio, SO\_REUSEPORT

## Related posts

- [Railway vs Cloudflare: How Their Architectures Differ and When to Use Each](https://swe.quest/articles/railway-vs-cloudflare-how-their-architectures-differ-and-when-to-use-each-da6a8e4c1e4636fe.md): Railway · 2025-11-28 · Medium · 15 min read · Serverless, CDN & edge, Cloud platforms, System design, Containers
  Railway and Cloudflare's Developer Platform feel similar on the surface but rest on opposite compute models.
- [Workflow SDK 5: built for production](https://swe.quest/articles/workflow-sdk-5-built-for-production-8a4967cc859bc936.md): Vercel · 2026-11-12 · Medium · 9 min read · Serverless, Resilience, Performance engineering, Cryptography, AI agents
  Workflow SDK 5 reworks Vercel's durable async JavaScript workflow engine around security, regional placement and performance.
- [Hello, World: We’re Railway](https://swe.quest/articles/hello-world-we-re-railway-63540b1cb9b8fafa.md): Railway · 2023-09-25 · Medium · 17 min read · Networking, CDN & edge, Load balancing, Infrastructure as code, Storage systems
  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.
- [Incident Report: October 16th, 2025](https://swe.quest/articles/incident-report-october-16th-2025-6eb111a489b39aef.md): Railway · 2025-10-16 · Easy · 3 min read · Incidents & postmortems, Load balancing, Resilience, CDN & edge
  A 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.
- [Going multi-cloud with an in-housed status page](https://swe.quest/articles/going-multi-cloud-with-an-in-housed-status-page-2873f2e1231f7f6e.md): Railway · 2026-06-01 · Medium · 5 min read · CDN & edge, Resilience, Caching, Incidents & postmortems, SRE
  Railway built its own status page, hosted on Railway itself, behind a Cloudflare Worker so the public page survives an origin outage.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
