Skip to content

scandiweb-extensions/redirects-bloom-filter

Repository files navigation

name slug description framework useCase css deployUrl demoUrl relatedTemplates
Edge Redirects with Bloom Filter
edge-redirects-bloom-filter
Redirect a large list of redirects using a Bloom Filter and Edge Middleware.
Next.js
Edge Middleware
Tailwind
redirects-upstash

Edge Middleware Redirects with Bloom Filter

This example shows how you can use a Bloom Filter in Edge Middleware to speed up the lookup of a large list of redirects. The demo has a total of 50,000 redirects, hard-coded in a JSON file.

Although a JSON file is being used, the principles are the same if storing the redirects in a database.

Demo

https://redirects-bloom-filter.vercel.app/

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

Clone and Deploy

Use create-next-app to bootstrap the example:

npx create-next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/redirects-bloom-filter

Next, run Next.js in development mode:

pnpm dev
# or
yarn dev
# or
npm run dev

Deploy it to the cloud with Vercel (Documentation).

Releases

No releases published

Packages

No packages published