Pub/Sub, Streams, Queues, and Event-Driven Workflows
Use Redis for lightweight messaging, event notifications, and background workflow coordination.
Inside this chapter
- Redis Beyond Caching
- Pub/Sub
- Lists and Queues
- Streams
- Real Example
Series navigation
Study the chapters in order for the clearest path from Redis basics to advanced cache architecture, operations, and distributed-system design. Use the navigation at the bottom to move smoothly through the full tutorial series.
Redis Beyond Caching
Redis is not limited to cache lookups. It can also support communication and coordination patterns between services or application components.
Pub/Sub
Pub/Sub allows publishers to send messages to channels and subscribers to receive them in real time. This works well for transient notifications but is not the same as durable queue processing.
Lists and Queues
Redis lists can be used for simple queues. This is useful for lightweight background jobs or handoff between components, though teams should understand delivery guarantees and operational limits.
Streams
Redis Streams add more powerful event-log style capabilities, including consumer groups and ordered records. They are useful when messaging requirements grow beyond basic pub/sub.
Real Example
An e-commerce system may publish inventory updates, queue email notifications, or stream order events for downstream services. Redis can support these coordination patterns when matched to the right scale and durability expectations.