shipfeedAI news, curated daily

23:05:45 CET
20 MAY23:05:45shipfeed
pull to refreshlast sync
Just in — 30 new
§ feed · storyline

Scaling redirects to infinity on Vercel

Vercel introduces a Bloom filter-based redirect system that scales to millions of redirects with near-constant lookup latency, replacing sequential routing rules limited to 2,000 entries.

Mar 3 · · primary fetch1 sourceupdated Mar 3 ·

Redirects are trivial at a small scale, but at millions, latency and cost become real systems problems. Previously on Vercel, redirects were handled by routing rules and middleware. Routing rules support up to 2,000 complex redirects with wildcards, and they function as an ordered list evaluated in sequence. Each rule may involve regex matching, meaning a single request could trigger many expensive evaluations. This is acceptable for a few thousand routing rules, but as counts grow, per-request work increases linearly. Middleware offers more flexibility, but it adds latency by running extra code on every request.

To serve millions of redirects with low latency, we needed a dedicated lookup path with near-constant or logarithmic time per request. Building on our , we found a way to scale to millions of redirects.previous work to make global routing faster with Bloom filters With those goals in mind, we started with the simplest design we could think of, combining the redirects and Bloom filter in a single file. Since the redirect data was already JSON, and our Bloom filters already supported JSON exporting, we decided to use the JSONL file format to store this information. A Bloom…

read full article on vercel.com
§ sources1 publication · timeline below
  1. vercel.comScaling redirects to infinity on Vercelprimary
Scaling redirects to infinity on Vercel · shipfeed