Kafka Wire Protocol
来源:互联网 发布:linux虚拟机建立文件夹 编辑:程序博客网 时间:2024/06/05 15:06
Network:
1、 Client和Server用的tcp连接,并不需要三次握手,(No handshake is required on connection or disconnection)
2、 server上面有连接请求数的限制,超过这个连接请求数,再次连接就会失败(The server has a configurable maximum limit on request sizeand any request that exceeds this limit will result in the socket beingdisconnected)
Partitioning and bootstrapping
1、 Client可以去任意一个broker上查询metadata 信息,这个信息包括有哪些topic,这些topic有多少分区,这些分区在哪些broker上面
2、 Client并不需要轮询kafka集群看这些metadata 信息是否过期,这个client可以取这个metadata 直到遇到以下错误:
(1) a socket error indicating the client cannotcommunicate with a particular broker,
(2) an error code in the response to a requestindicating that this broker no longer hosts the partition for which data wasrequested.
备注:so a request for a particular partition to the wrong brokerwill result in an the NotLeaderForPartition error code (described below).
Partitioning Strategies
1、分区的目的:
a) It balances data and request load over brokers
b) It serves as a way to divvy up processing among consumerprocesses while allowing local state and preserving order within the partition.We call this semantic partitioning.
2、 分区算法:
a) round robin
b) 如果producer的数量比broker的数量多,那么让每一个producer随机的只选择一个broker,会减少很多的tcp连接(因为每个producer只往一个broker上面写东西,只需要维护一个tcp连接)
c) 用key做hash
Batching
so a produce request may contain data to append to manypartitions and a fetch request may pull data from many partitions all at once.
- Kafka Wire Protocol
- Wire Protocol Buffers介绍
- Introducing Wire Protocol Buffers
- 关于Wire Protocol ODBC Driver
- Wire protocol buffers的使用
- What is JSON Wire Protocol?
- Peer wire protocol (TCP) Peer连接协议
- Appium的一点一滴:Mobile JSON Wire Protocol
- BitTorrent协议规范(BitTorrent Protocol Specification)之Peer Wire协议(Peer Wire Protocol)-第四部分
- Peer wire protocol (TCP) 基于tcp的那部分协议
- Mongo Wire Protocol(写MongoDB驱动必备)
- winsql 添加数据源没有winsql informix wire protocol 等选项
- Protobuf lua 错误:Protocol message tag had invalid wire type
- Kafka系列之-Kafka Protocol实例分析
- wire speed
- Protocol
- protocol
- Protocol
- 设置状态栏translucent潜在问题
- 错误让你崩溃了吗?
- Debian安装redmine3.2.2
- 实习这些事
- bzoj 3148: [Ctsc2013]没头脑和不高兴 数学&线段树
- Kafka Wire Protocol
- eclipse快捷键大全
- 大象Thinking in UML读书笔记☞ 第一章
- n-gram重探 Q&A
- Linux CentOS6.5下编译安装MySQL 5.6.16
- js创建子窗口,并通过子窗口操作父窗口的对象
- JAVA之字符串和Unicode码互转_中文转换为Unicode
- Java 连接Oracle的问题
- MyEclipse中的JDK环境注意的几个地方