Kafka-经纪人经纪人 [英] Kafka - Controller Broker

查看:141
本文介绍了Kafka-经纪人经纪人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 https://niqdev.github.io/devops/kafka/
https:/ /livebook.manning.com/book/kafka-streams-in-action/chapter-2/109 ( Kafka Streams in Action)

I come across this phrase from https://niqdev.github.io/devops/kafka/ and https://livebook.manning.com/book/kafka-streams-in-action/chapter-2/109 (Kafka Streams in Action )


控制器代理负责为主题的所有分区建立领导者/从属者关系。如果Kafka节点死亡或无响应(对ZooKeeper心跳),则其所有分配的分区(领导者和关注者)由控制器代理重新分配。

The controller broker is responsible for setting up leader/follower relationships for all partitions of a topic. If a Kafka node dies or is unresponsive (to ZooKeeper heartbeats), all of its assigned partitions (both leader and follower) are reassigned by the controller broker.

我认为将跟随者分区分配给其他经纪人是不正确的-因为除非经纪人回来,否则这些分区无法自我修复。我知道这仅适用于领导者副本,如果领导者副本的代理发生故障,包含跟随者的代理之一将成为领导者。但是,我不认为重新安置是可以接受的。追随者将自动发生,除非手动重新分配。请添加您的输入

I think it is not correct assignment of follower partitions to other brokers - as the partitions wont heal themselves unless the broker comes back . I know it ONLY happens for leader replica where if the broker that has leader replica gone down, one of the broker that contains follower will become leader. But, I dont think "reassigment" of followers will happen automatically unless reassignment is initiated manually. Please add your inputs

推荐答案

该术语可能确实有些偏离,但仍然适用。追随者不一定要分配给其他代理,但是他们需要将端点更改为要发送获取请求的端点。追随者的工作是与领导者保持同步,如果领导者由于旧的失败而被指派给新的经纪人,那么追随者需要将获取请求发送给新的当选经纪人。我认为这是重新分配在您共享的上下文中的意思。

The terminology might be a little off indeed but still applies. Followers are not necessarily assigned to other brokers but they need to change the endpoint to where they are going to send fetch requests. The follower's job is to stay in-sync with the leader, and if the leader has been assigned to a new broker because the old one failed then the followers need to send their fetch requests to the new elected broker. I think that is what reassignment means in the context that you shared.

这篇关于Kafka-经纪人经纪人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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