Configure Redis for cache and pub/sub #17

Closed
opened 2025-12-29 23:45:59 +00:00 by cardosofelipe · 0 comments

Description

Set up Redis configuration for caching and real-time event pub/sub.

Requirements

Redis Configuration

  • Connection pooling
  • Health check endpoint
  • Separate logical databases or key prefixes for:
    • Cache (sessions, API responses)
    • Pub/Sub (real-time events)
    • Celery broker

Backend Integration

  • Create app/core/redis.py with Redis client setup
  • Add health check for Redis in /health endpoint
  • Configure connection string from environment

Docker Compose

  • Add Redis service with health check
  • Volume for persistence
  • Expose port for local development

Acceptance Criteria

  • Redis service in Docker Compose
  • Health check endpoint includes Redis status
  • Connection pooling configured
  • Cache operations working (set/get/expire)
  • Pub/sub working (publish/subscribe)
  • Tests for Redis operations

Technical Notes

  • Reference: ADR-003 (Redis for cache/pub-sub)
  • Reference: SPIKE-003 (Real-time communication)
  • Use redis.asyncio for async support

Assignable To

backend-engineer agent (primary), devops-engineer agent (Docker)

## Description Set up Redis configuration for caching and real-time event pub/sub. ## Requirements ### Redis Configuration - Connection pooling - Health check endpoint - Separate logical databases or key prefixes for: - Cache (sessions, API responses) - Pub/Sub (real-time events) - Celery broker ### Backend Integration - Create `app/core/redis.py` with Redis client setup - Add health check for Redis in `/health` endpoint - Configure connection string from environment ### Docker Compose - Add Redis service with health check - Volume for persistence - Expose port for local development ## Acceptance Criteria - [ ] Redis service in Docker Compose - [ ] Health check endpoint includes Redis status - [ ] Connection pooling configured - [ ] Cache operations working (set/get/expire) - [ ] Pub/sub working (publish/subscribe) - [ ] Tests for Redis operations ## Technical Notes - Reference: ADR-003 (Redis for cache/pub-sub) - Reference: SPIKE-003 (Real-time communication) - Use `redis.asyncio` for async support ## Assignable To backend-engineer agent (primary), devops-engineer agent (Docker)
cardosofelipe added the backenddevopsphase-0 labels 2025-12-29 23:49:39 +00:00
Sign in to join this conversation.