Skip to main content

Security for Apache Kafkas

Kafka security and tuning means protecting a cluster and getting predictable performance from it. Security uses TLS for encryption, SASL or mutual TLS for authentication, and ACLs for authorisation, while tuning adjusts batching, compression, partition counts and consumer settings to balance throughput and latency.

Stage: Operations · Part of the Apache Kafka roadmap · Last reviewed 19 November 2026

What to learn in Security

Security interview questions

How do you restrict who can read a Kafka topic?

Enable an authorizer on the brokers, authenticate clients with SASL or mutual TLS, then create ACLs granting a principal the Read operation on that topic and on its consumer group. Without an authorizer and authentication, any client that can reach the broker can read.

How does linger.ms affect producer performance?

linger.ms makes the producer wait briefly so that more records can be grouped into one batch before sending. A larger value increases throughput and compression efficiency but adds latency to each message. Together with batch.size it is the first setting to tune for throughput.

Where Security fits in the Apache Kafka roadmap

Security belongs to the Operations stage (advanced level). Run it.

Back to the full Apache Kafka roadmap