| 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 |
|
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.
https://redirects-bloom-filter.vercel.app/
You can choose from one of the following two methods to use this repository:
Deploy the example using Vercel:
Use create-next-app to bootstrap the example:
npx create-next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/redirects-bloom-filterNext, run Next.js in development mode:
pnpm dev
# or
yarn dev
# or
npm run devDeploy it to the cloud with Vercel (Documentation).