Video in progress

When many teams use one Kafka cluster (multi-tenant), what do you do so that one team doesn't interfere with the others?

Each team gets its own identity (SASL/mTLS), prefix-based ACLs and producer/consumer/request quotas. On top of that come topic-level limits and monitoring; moving very critical or very noisy workloads to a separate cluster is also an option.

📖 Answer

The "noisy neighbor" problem is real: one team started re-reading a 30-day topic from the beginning for analytics, the broker disks and network filled up, and the payment service's latency went up 10x.

Layers of protection:

Identity. Every service gets its own principal: an mTLS certificate or SASL/SCRAM, OAuth in the cloud. A shared "app" user makes quotas and ACLs meaningless.

Authorization. Prefix ACLs: only User:payments-svc writes to topics starting with payments.. Consumer group names are protected with prefixes too, so a stranger can't connect with your group.id and "steal" offsets.

kafka-acls.sh --bootstrap-server kafka:9093 --command-config admin.properties \
  --add --allow-principal User:analytics-svc --operation Read \
  --topic payments. --resource-pattern-type prefixed

Quotas. producer_byte_rate, consumer_byte_rate, request_percentage per client or user. When a limit is exceeded, the broker delays the response (throttles); it doesn't return an error, so teams have to see this in a metric (throttle-time-avg).

Topic limits. Partition count, retention, max.message.bytes: no creating topics at will, only through GitOps.

Isolation level. Quotas limit network and CPU, but not disk IO and page cache completely. So I build "tiers": critical transactional load on a separate cluster, analytics and logs on another. It's more expensive, but one team's mistake doesn't affect the money.

And chargeback: when each team sees how much traffic and disk it uses, it starts saving on its own.