Why this matters
- VaultCommerce runs Redis beside Postgres for sessions, rate limits, and hot product metadata — workloads that need sub-millisecond reads, not transactional joins.
- Understanding the single-threaded model explains why slow commands block everything and why you size instances by memory, not CPU cores alone.
- Redis 7.x adds functions, ACLs, and improved I/O threading for network handling — but command execution on the primary thread remains the mental anchor.
How Redis fits VaultCommerce
VaultCommerce's polyglot stack keeps orders in Postgres and pushes ephemeral, high-churn data to Redis:
VaultCommerce Redis roles
- Session store —
session:{token}strings with TTL after login. - Product cache — JSON blobs for catalog pages that tolerate brief staleness.
- Inventory counters — atomic
DECRon flash-sale SKUs without row locks in Postgres. - Rate limiting — sliding-window counters per IP and per API key.
Postgres remains the source of truth. Redis accelerates reads and absorbs write spikes that would otherwise hammer the primary database.
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 4 sections
- Single-threaded event loop
- Memory, keys, and eviction
- Data types at a glance
- Persistence and scale (preview)
Test yourself
Answer these before moving on — recall is what makes it stick.