mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
20 lines
1.0 KiB
Plaintext
20 lines
1.0 KiB
Plaintext
---
|
|
title: 'Rate Limiting Edge Functions'
|
|
description: 'Rate Limiting Edge Functions with Upstash Redis.'
|
|
---
|
|
|
|
<div class="video-container">
|
|
<iframe
|
|
src="https://www.youtube-nocookie.com/embed/o4ooiE-SdUg"
|
|
frameBorder="1"
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
allowFullScreen
|
|
></iframe>
|
|
</div>
|
|
|
|
[Redis](https://redis.io/about/) is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. It is optimized for atomic operations like incrementing a value, for example for a view counter or rate limiting. We can even rate limit based on the user ID from Supabase Auth!
|
|
|
|
[Upstash](https://upstash.com/) provides an HTTP/REST based Redis client which is ideal for serverless use-cases and therefore works well with Supabase Edge Functions.
|
|
|
|
Find the code on [GitHub](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/upstash-redis-ratelimit).
|