Cluster discovery using DNS records

Learn about using a DNS server, which is the simplest cluster discovery method.

Kafka has built-in support for cluster discovery using a DNS server as a discovery service. In this case, the client uses a DNS server to resolve hostname aliases and then according to the response, it connects directly to a broker:

A possible solution is shown in the following sections using some DNS records with some examples. The examples are given using a possible syntax for a BIND DNS server, but any other DNS server can be used for the solution. BIND is used here for simplicity.