Design a Kafka-like distributed log: partitioned topics, consumer groups, retention, and replication. Publishers and consumers must scale horizontally while preserving ordering per key.
Functional requirements
- Durable append-only logs per topic with configurable partitions
- Consumer groups with offset management and at-least-once delivery
- Replication with leader election and ISR-style safety
- Compaction or tiered retention policies
- ACLs, quotas, and optional transactions for read-process-write flows
Non-functional requirements
- Horizontal scale via partition count and broker fleet growth
- High sustained write throughput with sequential disk I/O
- Graceful handling of broker loss within replication factor
- Operational visibility into lag, under-replicated partitions, and disk usage