Skip to content

Latest commit

 

History

History
74 lines (60 loc) · 4.01 KB

File metadata and controls

74 lines (60 loc) · 4.01 KB

Bootstrap broker configurations

Each broker requires a set of broker configurations that determine how all brokers communicate with each other and with clients. Bootstrapping a cluster configures the glossterm:listener[,listeners], glossterm:seed server[,seed servers], and glossterm:advertised listener[,advertised listeners], which ensure proper network connectivity and accessibility.

Starting in version 23.3.8, rpk enhances the bootstrapping process with additional flags for configuring advertised listener addresses directly.

Use the rpk redpanda config bootstrap command to bootstrap Redpanda:

sudo rpk redpanda config bootstrap --self <listener-address> --advertised-kafka <advertised-kafka-address> --ips <seed-server1-ip>,<seed-server2-ip>,<seed-server3-ip> && \
sudo rpk redpanda config set redpanda.empty_seed_starts_cluster false

Replace the following placeholders:

  • <listener-address>: The --self flag tells Redpanda the interfaces to bind to for the Kafka API, the RPC API, and the Admin API. These addresses determine on which network interface and port Redpanda listens for incoming connections.

    • Set the listener address to 0.0.0.0 to listen on all network interfaces available on the machine.

    • Set the listener address to a specific IP address to bind the listener to that address, restricting connections to that interface.

  • <advertised-kafka-address>: The --advertised-kafka flag sets a different advertised Kafka address, which is useful for scenarios where the accessible address differs from the bind address.

    Important
    Redpanda does not allow advertised addresses set to 0.0.0.0. If you set any advertised addresses to 0.0.0.0, Redpanda will output startup validation errors.
  • <seed-server-ips>: The --ips flag lists all the seed servers in the cluster, including the one being started.

    Note
    The --ips flag must be set identically (with nodes listed in identical order) on each node.

Bootstrapping Redpanda updates your /etc/redpanda/redpanda.yaml configuration file:

/etc/redpanda/redpanda.yaml
redpanda:
    data_directory: /var/lib/redpanda/data
    empty_seed_starts_cluster: false
    seed_servers:
        - host:
            address: <seed-server1-ip>
            port: 33145
        - host:
            address: <seed-server2-ip>
            port: 33145
        - host:
            address: <seed-server3-ip>
            port: 33145
    rpc_server:
        address: <listener-address>
        port: 33145
    kafka_api:
        - address: <listener-address>
          port: 9092
    admin:
        - address: <listener-address>
          port: 9644
    advertised_rpc_api:
        address: <listener-address>
        port: 33145
    advertised_kafka_api:
        - address: <advertised-kafka-address>
          port: 9092

Recommendations

  • Redpanda Data strongly recommends at least three seed servers when forming a cluster. A larger number of seed servers increases the robustness of consensus and minimizes any chance that new clusters get spuriously formed after brokers are lost or restarted without any data.

  • It’s important to have one or more seed servers in each fault domain (for example, in each rack or cloud AZ). A higher number provides a stronger guarantee that clusters don’t fracture unintentionally.

  • It’s possible to change the seed servers for a short period of time after a cluster has been created. For example, you may want to designate one additional broker as a seed server to increase availability. To do this without cluster downtime, add the new broker to the seed_servers property and restart Redpanda to apply the change on a broker-by-broker basis.

Listeners for mixed environments

For clusters serving both internal and external clients, configure multiple listeners for the Kafka API to separate internal from external traffic.

For more details, see manage:security/listener-configuration.adoc.