Optimizing redirect performance requires rethinking how network packets traverse the cloud. In this engineering post, we outline our journey replacing legacy Node.js routing backends with edge runtimes operating at cloud ingress nodes.
The Architecture
By compiling routing modules into WebAssembly modules running within V8 Isolates, we spin up sandboxed route handlers in microseconds. Dynamic redirect records are cached locally using an in-memory key-value store. If the link rules exist in the local edge cache, the HTTP 307 redirect is returned immediately, achieving sub-5ms times.
Client Request (Japan)
│
▼
Edge Server (Tokyo Edge) ───[ local KV Cache ]───► 307 Redirect (Found)
│ (Cache Miss)
▼
Global Store (US East)DNS and Latency Performance
Anycast IP routing routes user traffic to the nearest global point of presence (PoP). Once at the PoP, connections are terminated immediately, saving costly TCP handshakes over long distances. We run optimized TLS sessions to ensure that the secure connection overhead is also minimized to under a few milliseconds.
