August 3, 2025 1 min read
PostgreSQL vs Redis: Choosing the Right Data Store
Decision
Depth: ●●○○○
When to use PostgreSQL, when to use Redis, and when to use both together.
PostgreSQL vs Redis: Choosing the Right Data Store
They solve different problems. Here's my decision framework.
PostgreSQL Excels At
1. ACID transactions - when data consistency is critical
2. Complex queries with JOINs
3. Long-term storage
4. Relational data with foreign keys
Redis Excels At
1. Caching frequently accessed data
2. Session storage
3. Real-time leaderboards and counters
4. Pub/sub for real-time features
The Hoop Almanac Architecture
We use both: PostgreSQL stores the canonical draft state. Redis caches active drafts and handles pub/sub for real-time updates. On reconnect, we reconcile Redis state with PostgreSQL.