Back to News
UpdatesNewsEngineering
Engineering

How we resolved global URL redirects in under 5ms using V8 Runtimes

A deep dive into serverless edge architectures, DNS propagation, and optimizing key-value caches for low-latency redirection pipelines.

D
David Vance
Writer
May 18, 20268 min read

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.

Ready to experience modern redirection rules?

Create secure custom domains, configure dynamic rules, and trace UTM tags in under 5ms at the global edge.