`
bit1129
  • 浏览: 1051642 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【Kafka十一】关于Kafka的副本管理

 
阅读更多

1. 关于request.required.acks

 

request.required.acks控制者Producer写请求的什么时候可以确认写成功,默认是0,

0表示即不进行确认即返回。

1表示Leader写成功即返回,此时还没有进行写数据同步到其它Follower Partition中

-1表示根据指定的最少Partition确认后才返回,这个在

 

This value controls when a produce request is considered completed. Specifically, how many other brokers must have committed the data to their log and acknowledged this to the leader? Typical values are

  • 0, which means that the producer never waits for an acknowledgement from the broker (the same behavior as 0.7). This option provides the lowest latency but the weakest durability guarantees (some data will be lost when a server fails).
  • 1, which means that the producer gets an acknowledgement after the leader replica has received the data. This option provides better durability as the client waits until the server acknowledges the request as successful (only messages that were written to the now-dead leader but not yet replicated will be lost).
  • -1, The producer gets an acknowledgement after all in-sync replicas have received the data. This option provides the greatest level of durability. However, it does not completely eliminate the risk of message loss because the number of in sync replicas may, in rare cases, shrink to 1. If you want to ensure that some minimum number of replicas (typically a majority) receive a write, then you must set the topic-level min.insync.replicas setting. Please read the Replication section of the design documentation for a more in-depth discussion

2. 关于min.insync.replicas

When a producer sets request.required.acks to -1, min.insync.replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception (either NotEnoughReplicas or NotEnoughReplicasAfterAppend). When used together, min.insync.replicas and request.required.acks allow you to enforce greater durability guarantees. A typical scenario would be to create a topic with a replication factor of 3, set min.insync.replicas to 2, and produce with request.required.acks of -1. This will ensure that the producer raises an exception if a majority of replicas do not receive a write.

 

 

3. 关于Lead Partition和Follower Parttiion

 

Each partition has one server which acts as the "leader" and zero or more servers which act as "followers". The leader handles all read and write requests for the partition while the followers passively replicate the leader. If the leader fails, one of the followers will automatically become the new leader. Each server acts as a leader for some of its partitions and a follower for others so load is well balanced within the cluster.

 

也就是说,读写操作都是发生在每个Partition的Lead Partition上,Follower Partition只是用来做备份以便进行失败转移

 

 

4. default.replication.factor

每个Partition有几个副本,默认是1,即只有1个副本(即不做备份)

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    Kafka深入理解分区副本机制.md

    Kafka深入理解分区副本机制,进阶篇

    尚硅谷大数据技术之Kafka(笔记+代码+资料).rar

    在本课程中,你将学习到,Kafka架构原理、安装配置使用、详细的Kafka写入数据和处理数据以及写出数据的流程、新旧版本对比及运用、分区副本机制的详解、内部存储策略、高阶API直接消费数据、等等

    docker容器中搭建kafka集群环境 - 副本.doc

    docker容器中搭建kafka集群环境

    kafka安装与基本操作 - 副本.md

    kafka安装与基本操作 - 副本

    kafka-manager-2.0.0.2.zip

    为了简化开发者和服务工程师维护Kafka集群的工作,构建了一个叫做Kafka管理器的基于Web工具,叫做 Kafka Manager。这个管理工具可以很容易地发现分布在集群中的哪些topic分布不均匀,或者是分区在整个集群分布不均匀...

    Flink+Kafka搭建流式处理框架(内涵docker部署脚本和k8s多副本部署脚本)

    flink搭配kafka,构建流式采集框架,提供了docker部署方式脚本和k8s多副本方式部署脚本

    SpringBoot-2.0.4整合kafka

    springboot2.0.4版本 整合kafka 小Demo,需要的小伙伴可以试试

    kafka-manager-2.0.0.2

    管理多个集群 轻松检查群集状态(主题,消费者,偏移,代理,副本分发,分区分发) 运行首选副本选举 使用选项生成分区分配以选择要使用的代理 运行分区重新分配(基于生成的分配) 使用可选主题配置创建主题(0.8....

    kafka-manager-2.0.0.0-.zip

    kafka-manager是目前最受欢迎的kafka集群管理工具,最早由雅虎开源,用户可以在Web界面执行一些简单的集群管理操作。具体支持以下内容: 管理多个集群 轻松检查群集状态(主题,消费者,偏移,代理,副本分发,...

    kafka0.10软件包以及安装步骤 - 副本.rar

    kafka0.10软件包+详细安装步骤绿色无毒放心使用。请给好评谢谢

    一个美观简洁且强大的kafka web管理工具

    kafka 简介 kafka-map是使用Java17和...如您需要在企业网络中使用 kafka-map ,建议先征求 IT 管理员的同意。下载、使用或分发 kafka-map 前,您必须同意 协议 条款与限制。本项目不提供任何担保,亦不承担任何责任。

    kafka学习资料

    kafka是最初由Linkedin公司开发,使用Scala语言编写,Kafka是一个分布式、分区的、多副本的、多订阅者的日志系统(分布 式MQ系统),可以用于web/nginx日志,搜索日志,监控日志,访问日志等等。 Kafka是一种分布式的...

    kafka-manager.zip

    kafka-manager是最受欢迎的kafka集群管理工具,可以管理多个集群、轻松检查群集状态(主题,消费者,偏移,代理,副本分发,分区分发)

    4、kafka分区、副本介绍及示例、高级API与低级API

    4、kafka分区、副本介绍及示例、高级API与低级API 网址:https://blog.csdn.net/chenwewi520feng/article/details/130580533 本文主要介绍分区与副本机制、高级api使用示例手动消费分区数据等。 本文前提是kafka环境...

    kafka常用操作命令.txt

    kafka对主题、分区、副本的一些常用命令。

    kafka-workshop:Kafka和Kafka Streams研讨会的材料(幻灯片和代码)

    主题1:适用于管理员和操作员的Apache Kafka:trade_mark: (体系结构和核心概念) 使用Kafka主题副本和同步副本(ISR) 使用kafka-topics shell脚本管理主题Kafka配置Kafka服务器和计划的定期任务KafkaMetricsGroup ...

    kafka教程.pdf

    Apache Kafka是一个分布式流...Replica:副本,为保证集群中的某个节点发生故障时,该节点上的partition数据不丢失,且Kafka仍然能够继续工作,Kafka提供了副本机制,一个topic的每个分区都有若干个副本,一个leader

    Kafka-Manager编译后文件

    一个管理Apache Kafka的工具。 它支持以下内容: 管理多个群集 轻松检查群集状态(主题,消费者,偏移量,经纪人,副本分布,分区分布) 运行首选副本选举 使用选项生成分区分配以选择要使用的代理 运行分区的重新...

    kafka 监控UI

    管理多个kafka集群 便捷的检查kafka集群状态(topics,brokers,备份分布情况,分区分布情况) 选择你要运行的副本 基于当前分区状况进行 可以选择topic配置并创建topic(0.8.1.1和0.8.2的配置不同) 删除topic(只支持0.8.2...

Global site tag (gtag.js) - Google Analytics