advanced
Kafka topics
Моделируйте topics вокруг durable event streams с clear names, schemas, ownership, retention expectations и compatibility rules.
Kafka topics — durable partitioned logs с именами по domain (например orders.events). Дизайн включает ownership team, schema subject, partition count, retention, compaction policy и ACLs. Topic sprawl без governance — integration maze.
Компромисс: fine-grained topics упрощают consumers против operational overhead; coarse topics смешивают ordering concerns.
На интервью: имя и partition для user-activity stream; кто владеет schema и consumer groups.
Типовые ошибки: мало partitions блокирует scale; PII в broadly subscribed topics; нет naming convention.
Чеклист:
- Convention: domain.entity.action или аналог.
- Owner, schema и subscribers в документации.
- Right-size partitions под throughput и consumers.
- Явные retention и cleanup policies.