Skip to main content
InterviewHubPRO
Section Overview
Q45

Question 45 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

90%
Redis & Caching (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Redis Streams vs Kafka vs Pub/Sub.

senior LevelApache KafkaMicroservices

In Simple Words:

  • Pub/Sub: Fire-and-forget; messages are lost if the subscriber is disconnected. No persistence, no replay.
  • Redis Streams (XADD, XREADGROUP): Persistent append-only log with consumer groups, message acknowledgments (XACK), and Pending Entries List (PEL) for reprocessing unacknowledged crashed consumer messages.
  • vs Kafka: Redis Streams runs purely in memory (microsecond latency), best for real-time messaging workloads that fit within RAM.