Hasty Briefsbeta

Bilingual

<antirez>

7 hours ago
  • Redis Streams fill the gap between lists, sorted sets, and Pub/Sub for modeling message sequences or events.
  • The concept was inspired by Kafka consumer groups and a user's idea of a transaction log style data type.
  • Implementation uses radix trees and listpacks for space efficiency and indexed access by ID or time.
  • Key commands include XADD (add entry), XRANGE (range queries), and XREAD (blocking read from multiple streams).
  • Capped streams are supported via MAXLEN with optional approximate trimming using '~'.
  • Consumer groups (in progress) allow multiple clients to share messages with acknowledgment and retry features.
  • Memory usage is low; RDB loading is fast (e.g., 5 million entries in 0.3 seconds).
  • Streams will be backported to Redis 4.0 within two months for production use.