Kafka是否在经纪人集群之前支持ELB? [英] Does Kafka support ELB in front of broker cluster?

查看:58
本文介绍了Kafka是否在经纪人集群之前支持ELB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对AWS上的Kafka经纪人集群有疑问.现在,在群集的前面有一个AWS ELB,但是当我将生产者或使用者的"bootstrap.servers"属性设置为我的ELB的"A"记录(和正确的端口号)时,生产者和使用者分别无法产生和使用消息.我已经关闭了代理上的所有SSL,并且正在通过PLAINTEXT 9092端口进行连接,而我的ELB使用该端口将端口1234转发到9092.因此,例如,在我的Producer Configs属性中,我将拥有...

I had a question regarding Kafka broker clusters on AWS. Right now there is an AWS ELB sitting in front of the cluster, but when I set the "bootstrap.servers" property of my producer or consumer to the "A" record (and correct port number) of my ELB, both the producer and consumer fail to produce and consume messages respectively. I have turned off all SSL on my broker and am connecting through the PLAINTEXT 9092 port, with which my ELB forwards port 1234 to 9092. So in my Producer Configs properties for example, I will have...

bootstrap.servers =(ELB的"A"记录):1234

bootstrap.servers = ("A" record of ELB):1234

更多信息:

  • 我的ELB协议是TCP/TCP
  • 我在经纪人上的"advertised.listeners"属性为PLAINTEXT://(ec2-private-ip):9092

有人在ELB后面经营Kafka时有运气吗?如果是这样,请帮帮我!

Has anyone had any luck running Kafka behind an ELB? If so, please help me out!

推荐答案

您可以将ELB用作 bootstrap.servers ,但是客户端仍需要直接访问代理.ELB将用于客户端提出的初始元数据请求,以找出哪些主题分区位于哪些代理上,但是此后它将使用服务器的主机名(或 advertised.listeners 设置您需要对其进行自定义,例如,在EC2实例上可能需要使用它来获取服务器的公共IP.

You can use an ELB as the bootstrap.servers, but the brokers still need to be directly accessible to the client. The ELB will be used for the initial metadata request the client makes to figure out which topic partitions are on which brokers, but after that it'll use the hostname of the server (or advertised.listeners setting if you need to customize it, which, e.g. might be necessary on EC2 instances to get the public IP of a server).

这篇关于Kafka是否在经纪人集群之前支持ELB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆