FRE-4521 Implement Redis integration for rate limiting and deduplication
- Add ioredis dependency for Redis connection pooling - Create RedisService singleton with connection management - Add Redis config (url, dedupWindowSeconds) to notification.config.ts - Implement NotificationService.checkRateLimit using Redis INCR+EXPIRE - Implement NotificationService.deduplicateNotification using Redis SET/NX - Add configurable rate limit windows and thresholds via env vars - Add 29 unit tests covering Redis operations, rate limiting, and dedup - All tests pass, TypeScript compiles cleanly for new files
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
"firebase-admin": "^12.0.0",
|
||||
"twilio": "^4.0.0",
|
||||
"zod": "^3.22.0",
|
||||
"express": "^4.18.0"
|
||||
"express": "^4.18.0",
|
||||
"ioredis": "^5.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.0",
|
||||
|
||||
Reference in New Issue
Block a user