Redis Stream Coordinator
Design docs

Redis Stream Coordinator Design

Redis Stream Coordinator adapts the coordinator-managed consumer rebalance idea from Kafka KIP-848 to Redis Stream sharding. The project provides a dedicated coordinator server, a Spring Boot consumer integration module, a Spring Boot producer routing/publishing module, and monitoring/API documentation for operating the system.

The reason for this module is practical: Redis Stream is useful as a lightweight log, but a single stream key can become a BigKey and a single Redis Cluster hash-slot hotspot. Redis itself does not provide a broker-side coordinator that owns shard assignment, membership, producer routing metadata, revoke-before-assign handoff, and resharding protocol for a logical stream. There are also very few public references that combine Redis Stream BigKey mitigation, Redis Cluster slot distribution, and consumer ownership coordination. This project fills that gap with a reusable open-source control plane and Spring Boot integration.

Design Index

  1. Context, Goals, Non-Goals
  2. Coordinator Architecture
  3. Group Metadata and Assignment Model
  4. Resharding, Routing, and Admin API
  5. Member Data-Plane Boundary
  6. Coordinator Data, Configuration, and Observability
  7. MVP Scope, Tradeoffs, Risks, and Open Questions
  8. KIP-848 Implementation Coverage
  9. Coordinator API Endpoints
  10. RedisStream Spring Boot Starter and Integration Contract
  11. Versioning and Compatibility Policy
  12. Failure Modes and Edge Cases
  13. Terraform and GitOps Governance
  14. Edge Case Q&A
  15. Scalar API Reference

Why This Exists

Redis Stream applications often start with one stream key per topic. That is simple, but it concentrates stream entries, pending-entry metadata, consumer-group metadata, and write/read traffic on one Redis key. In Redis Cluster, that one key maps to one hash slot and one primary node, so adding more cluster nodes does not automatically distribute a hot stream.

The usual mitigation is to split one logical stream into many physical stream shard keys. Once that happens, the application needs a control plane: producers need the current shard layout, consumers need ownership assignment, and operators need a way to scale shard count without two consumers processing the same shard at the same time.

This project provides that missing control plane. It keeps Redis Stream as the data plane and adds coordinator-owned metadata, heartbeat-driven assignment, revoke-before-assign handoff, routing metadata for producers, and monitoring APIs for operators.

Product Summary

Redis Stream Coordinator is a control-plane server that centrally manages Redis Stream shard ownership. Consumer runtime members send heartbeats to the coordinator API, report their current ownership, and receive the target assignment they should converge to. The coordinator recalculates target assignment when membership, capacity, shard count, or shard metadata changes.

The consumer module connects Spring Boot applications to coordinator heartbeat, assignment, revocation, fencing, and optional Redis Stream polling. The producer module resolves coordinator-managed routing metadata and publishes records to the active Redis Stream shard.

The system is designed for Redis Stream workloads that need to avoid single-stream BigKey growth and distribute traffic across Redis Cluster hash slots while retaining a coordinator-managed rebalance model.

Core Decisions

Success Criteria

Guarantee Boundaries