Feature Request: Redis Caching & Rate Limiting for Blogic Backend
📌 Background
Currently, the Blogic backend interacts directly with MongoDB for every request.
There is no protection against high-frequency automated requests (DoS/DDoS) or abuse of the AI generation feature.
🎯 Goals
- Improve response times for blog posts and comments using Redis caching.
- Secure the API with global and AI-specific rate limiting.
- Reduce database load and infrastructure costs.
🛠 Proposed Features
1. Redis Caching System
- Cache all blogs and single blog details.
- Cache comments for each blog post.
- Implement automated cache invalidation on create, update, and delete operations to ensure data consistency.
2. Multi-layer Rate Limiting
- Global API Limiter: Prevent DoS/DDoS attacks with a reasonable per-IP limit.
- AI-Specific Limiter: Restrict high-cost Gemini AI calls (e.g., 5 requests per hour).
✅ Implementation Checklist
📈 Expected Impact
- Faster page loads for the frontend.
- Decreased Mongoose/MongoDB resource consumption.
- Enhanced security and cost control for AI features.
🔒 Priority
High – This feature directly impacts performance, scalability, and security.
🧩 Labels
enhancement backend performance security redis rate-limiting
Feature Request: Redis Caching & Rate Limiting for Blogic Backend
📌 Background
Currently, the Blogic backend interacts directly with MongoDB for every request.
There is no protection against high-frequency automated requests (DoS/DDoS) or abuse of the AI generation feature.
🎯 Goals
🛠 Proposed Features
1. Redis Caching System
2. Multi-layer Rate Limiting
✅ Implementation Checklist
apiLimiterandaiLimiterusingexpress-rate-limit.cacheMiddlewarefor GET requests.📈 Expected Impact
🔒 Priority
High – This feature directly impacts performance, scalability, and security.
🧩 Labels
enhancementbackendperformancesecurityredisrate-limiting