Does Kafka support ELB in front of a cluster of brokers?

I have a question about Kafka broker clusters on AWS. Right now, ELS AWS is in front of the cluster, but when I set the "bootstrap.servers" property of my producer or consumer to write "A" (and the correct port number) of my ELB, both the producer and the producer, the consumer does not produce and consumes messages accordingly. I disabled all SSL on my broker and connect through the PLAINTEXT port 9092, with which my ELB forwards the port from 1234 to 9092. Therefore, for example, in my Producer Configs settings I will ...

bootstrap.servers = (entry "EL"): 1234

Additional Information:

  • My ELB Protocol - TCP / TCP
  • The property "advertized.listeners" for brokers is PLAINTEXT: // (ec2-private-ip): 9092

Is anyone really lucky with Kafka for ELB? If yes, please help me!

+4
source share
2 answers

You can use ELB as bootstrap.servers, but brokers should still be directly accessible to the client. The ELB will be used for the initial request for metadata, which the client makes to find out which sections of the topic belong to the broker, but after that it will use the host name of the server (or advertised.listeners, if you need to configure it, which, for example, may be required in EC2 instances to receive public IP address of the server).

+5
source

IMHO, It is not recommended to add additional SLBs to the kafka cluster.

  • Kafka , SLB .
  • , SLB .
0

Source: https://habr.com/ru/post/1649579/


All Articles