SlideShare una empresa de Scribd logo
1 de 27
The Structural Evolution of RoP
冉小龙,韩明泽
Who am i
• PingCAP -> StreamNative -> Tencent
• Apache Pulsar committer
• Apache BookKeeper contributor
• RoP maintainer
• Apache Pulsar Go client 作者
• Apache Pulsar Go Functions 作者
• StreamNative/pulsarctl 作者
RoP 1.0 offset 处理
RocketMQ 64 Bit Offset
Pulsar
8 bit
Partition ID 32 bit Ledger ID 24 bit Entry ID
• 精度丢失
• 对 RocketMQ offset 认识不足
• queue offset
• commitlog offset
存在的问题:
精度丢失
RoP 2.0 offset 处理
https://github.com/apache/pulsar/wiki/PIP-70%3A-Introduce-lightweight-broker-entry-metadata
TOTAL_SIZE CMD_SIZE CMD MAGIC_NUMBER CHECKSUM METADATA_SIZE METADATA PAYLOAD
原始消息协议:
MAGIC_NUMBER CHECKSUM METADATA_SIZE METADATA PAYLOAD
HEADERS_AND_PAYLOAD
HEADERS_AND_PAYLOAD
Broker Entry Metadata 消息协议:
BROKER_ENTRY_METADATA
BROKER_ENTRY_METADATA_SIZE
BROKER_ENTRY_METADATA_MAGIC_NUMBER
PIP-70: Broker Entry Metadata
brokerEntryMetadataInterceptors=org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor
对 RocketMQ offset 认识不足
RoP 2.0 offset 处理
RocketMQ 64 Bit Offset
commitLog Offset
10 bit
partition nums
1
bit
保
留
位
1
bit
标
记
Retry
52 bit message offsets
RoP 2.0 offset 处理
RoP 2.0 ALC-client
RoP 2.0 ALC-Server
RoP 2.0 ALC-Server
Rop Proxy
GET-ROUTEINFO_BY_TOPIC Lookup
RocketMQ 路由协议:
- Broker 服务的IP地址
- Broker 上对应 Topic 分区信息(数量+权限)
Rop Proxy
Broker-Tag + Broker-Topic-Seq
需要去处理的问题
- Topic 的映射关系存储到哪里
- 路由关系如何分配
- 当路由关系发生变化之后如何分配
Rop Proxy
Rop Proxy
存储在 zookeeper:
- 不需要引入新的组件
- 复用 Pulsar 自身的路由模型,实现简单
- 初始分配后虚拟节点和物理节点处于同一个节点上,性能好
Rop Proxy
Master-Slave 模型:
- 减少单节点故障对系统的影响
- 各个节点的元数据信息可以保持一致 – offset sotre CompactTopic
RoP 延迟消息
RoP 延迟消息
Pulsar延迟消息
RoP 延迟消息
当前pulsar延迟消息存在的问题:
- 无法支持海量延迟消息
- 只能通过高阶consumer接口来读取数据
我们想要的延迟消息实现:
- 支持海量任意时间延迟消息 => 只加载最近的延迟消息到内存索引
- 支持通过底层cursor接口读取 => 在生产端实现消息延迟
RoP 延迟消息
分布式kv存储 + 时间轮询
RoP 延迟消息
优点:
- 抗积压
- 实现简单
- 扩展性强
缺点:
- 依赖外部系统(依赖稳定的kv存储)
- 兼容性差(不兼容pulsarproducer接口)
RoP 延迟消息
时间轮 – 内存索引
RoP 延迟消息
优点:
-抗积压
-不需要依赖外部系统
缺点:
-数据多次复制
-主题、分区数量多
RoP 延迟消息
索引时间轮
RoP 延迟消息
使用示例
RoP 延迟消息
THANK YOU FOR
WATCHING

Más contenido relacionado

La actualidad más candente

Php Webservers
Php WebserversPhp Webservers
Php Webservers
samon127
 
Colonel转码集群
Colonel转码集群Colonel转码集群
Colonel转码集群
pluschen
 
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
hugo
 
深入浅出Netty l.t
深入浅出Netty   l.t深入浅出Netty   l.t
深入浅出Netty l.t
oleone
 
Openstack neutron 原理详解
Openstack neutron 原理详解Openstack neutron 原理详解
Openstack neutron 原理详解
Yong Luo
 
Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙
drewz lin
 

La actualidad más candente (20)

Php Webservers
Php WebserversPhp Webservers
Php Webservers
 
Colonel转码集群
Colonel转码集群Colonel转码集群
Colonel转码集群
 
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
 
高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践
 
深入浅出Netty l.t
深入浅出Netty   l.t深入浅出Netty   l.t
深入浅出Netty l.t
 
Openstack neutron 原理详解
Openstack neutron 原理详解Openstack neutron 原理详解
Openstack neutron 原理详解
 
Kafka cluster best practices
Kafka cluster best practicesKafka cluster best practices
Kafka cluster best practices
 
Golang 高性能实战
Golang 高性能实战Golang 高性能实战
Golang 高性能实战
 
Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙
 
Rpc原理与实现
Rpc原理与实现Rpc原理与实现
Rpc原理与实现
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvements
 
introduce Okhttp
introduce Okhttpintroduce Okhttp
introduce Okhttp
 
基于Fuel的超融合一体机
基于Fuel的超融合一体机基于Fuel的超融合一体机
基于Fuel的超融合一体机
 
微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)
 
聊聊我接触的集群管理
聊聊我接触的集群管理聊聊我接触的集群管理
聊聊我接触的集群管理
 
How to upgrade_ror3_to_ror4
How to upgrade_ror3_to_ror4How to upgrade_ror3_to_ror4
How to upgrade_ror3_to_ror4
 
Golang advance
Golang advanceGolang advance
Golang advance
 
Linux bonding
Linux bondingLinux bonding
Linux bonding
 
MPTCP学习
MPTCP学习MPTCP学习
MPTCP学习
 
Ryu Learning Guide
Ryu Learning GuideRyu Learning Guide
Ryu Learning Guide
 

Similar a The Evolution History of RoP(RocketMQ-on-Pulsar) - Pulsar Summit Asia 2021

淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化
丁 宇
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践
丁 宇
 
Http协议介绍
Http协议介绍Http协议介绍
Http协议介绍
Sanji Zhang
 
第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp
F.l. Yu
 
Lamp优化实践
Lamp优化实践Lamp优化实践
Lamp优化实践
zhliji2
 
網路技術心得分享
網路技術心得分享網路技術心得分享
網路技術心得分享
Mux Baxer
 
Pptv lb日志实时分析平台
Pptv lb日志实时分析平台Pptv lb日志实时分析平台
Pptv lb日志实时分析平台
drewz lin
 

Similar a The Evolution History of RoP(RocketMQ-on-Pulsar) - Pulsar Summit Asia 2021 (20)

淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化淘宝前台系统性能分析与优化
淘宝前台系统性能分析与优化
 
淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践淘宝网前台应用性能优化实践
淘宝网前台应用性能优化实践
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇未来网络技术发展探梦 - 开篇
未来网络技术发展探梦 - 开篇
 
Http协议介绍
Http协议介绍Http协议介绍
Http协议介绍
 
高性能远程调用解决方案
高性能远程调用解决方案高性能远程调用解决方案
高性能远程调用解决方案
 
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledgeLinux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
 
Scaling Offline Database Usage On GCP @ Dcard
Scaling Offline Database Usage On GCP @ DcardScaling Offline Database Usage On GCP @ Dcard
Scaling Offline Database Usage On GCP @ Dcard
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
 
第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp
 
Lamp优化实践
Lamp优化实践Lamp优化实践
Lamp优化实践
 
deep inside Sina App Engine cloud service
deep inside Sina App Engine cloud servicedeep inside Sina App Engine cloud service
deep inside Sina App Engine cloud service
 
Sae
SaeSae
Sae
 
MongoDB at Qihoo 360
MongoDB at Qihoo 360MongoDB at Qihoo 360
MongoDB at Qihoo 360
 
Node combo
Node comboNode combo
Node combo
 
網路技術心得分享
網路技術心得分享網路技術心得分享
網路技術心得分享
 
Pptv lb日志实时分析平台
Pptv lb日志实时分析平台Pptv lb日志实时分析平台
Pptv lb日志实时分析平台
 
Python 于 webgame 的应用
Python 于 webgame 的应用Python 于 webgame 的应用
Python 于 webgame 的应用
 
Elastic stack day-2
Elastic stack day-2Elastic stack day-2
Elastic stack day-2
 
构建ActionScript游戏服务器,支持超过15000并发连接
构建ActionScript游戏服务器,支持超过15000并发连接 构建ActionScript游戏服务器,支持超过15000并发连接
构建ActionScript游戏服务器,支持超过15000并发连接
 

Más de StreamNative

Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
StreamNative
 

Más de StreamNative (20)

Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...
 
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
 
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
 
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
 
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
 
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
 
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
 
Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
 
Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022
 
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
 
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
 
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
 
Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022
 
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
 

The Evolution History of RoP(RocketMQ-on-Pulsar) - Pulsar Summit Asia 2021