Skip to content

Implement Redis rate-limiting storage#220

Open
samsonmbah002 wants to merge 1 commit into
MissBlue00:mainfrom
samsonmbah002:feat/issue-185-redis-rate-limiting-storage
Open

Implement Redis rate-limiting storage#220
samsonmbah002 wants to merge 1 commit into
MissBlue00:mainfrom
samsonmbah002:feat/issue-185-redis-rate-limiting-storage

Conversation

@samsonmbah002

Copy link
Copy Markdown

Summary

Wire up ThrottlerStorageRedisService with actual Redis pipeline commands using ioredis.

Changes

  • Implemented increment() using Redis MULTI/EXEC pipeline:
    • INCR the rate-limit key
    • TTL to get remaining time-to-live
    • EXPIRE to set expiry on first request
  • Added Redis connection config via env vars (REDIS_HOST, REDIS_PORT) with fallback defaults
  • Wired up ThrottlerStorageRedisService in AppModule as storage provider
  • Graceful fallback when Redis is unavailable

Path

  • apps/api/src/rate-limiter/throttler-storage-redis.service.ts
  • apps/api/src/app.module.ts

Closes #185

Wire up ThrottlerStorageRedisService with actual Redis commands using ioredis:
- Connect to Redis via REDIS_HOST/REDIS_PORT env vars
- Use MULTI/EXEC pipeline for atomic INCR + TTL
- Set EXPIRE on first request
- Handle connection failures gracefully with fallback

Closes MissBlue00#185
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Ebuka321 is attempting to deploy a commit to the missblue00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@samsonmbah002 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Redis rate-limiting storage

2 participants