SlideShare a Scribd company logo
如何在复杂 toB 场景下对
Pegasus 进行持续改进
2022.11
王浩
• Who are we
• Pegasus 在神策支持的业务场景
• Pegasus 在神策是如何进行工程化管理的
• 神策近期在 Pegasus 社区的建设
• Who are we
神策数据(Sensors Data)是国内专业的大数据分析和营销科技服务提供商,为企业提供
神策营销云、神策分析云、神策数据根基平台三大产品方案,通过全渠道的数据采集与全域
用户 ID 打通,全场景多维度数据分析,全通道的精准用户触达,帮助企业实现数字化经营。
大数据分析和营销科技服务提供商
How to continuously improve Apache Pegasus in complex toB scenarios
How to continuously improve Apache Pegasus in complex toB scenarios
How to continuously improve Apache Pegasus in complex toB scenarios
Pegasus 在神策的迁移框架
• 背景
• to B背景,属于较频繁操作
• 在线业务也开始有迁移需求
• 框架演变
table_3
table_2
基于copy_data的普通迁移
table_1
1. pre_check
2. copy_data
3. post_check
table_3
table_2
table_1
文件迁移
1.0 rep 1.1 rep 1.2 rep 1.3 rep
2.0 rep 2.1 rep 2.2 rep 2.3 rep
backup restore
nfs迁移(理想方案)
• 思路:
• 迁移的本质是在新环境中添加副本,能否通过老集群内部命令实现迁移
• 实现
1. 可以先在环境中增加一组replica_server, 然后通过add_secondary的方式补
在新节点上(可以通过Pegasus shell命令完成)
2. 切断老环境
3. 新环境进行元数据重做,实现数据迁移的目的
Pegasus + Ranger 的鉴权策略
Pegasus + Ranger 的鉴权策略
• Pegasus ACL现状
• 可以优化的地方
• 可以制定更多级别的资源分层
• 可以制定更细粒度的ACL
• 各个资源之间的ACL应该是严格分开的
Pegasus + Ranger 的鉴权策略
• 与Ranger集成
Pegasus + Ranger 的鉴权策略
Pegasus + Ranger 的鉴权策略
Pegasus + Ranger 的鉴权策略
Pegasus + Ranger 的加密策略
• Apache Ranger 支持的策略
Pegasus + Ranger 的鉴权策略
• Pegasus 集成到 Ranger
• https://issues.apache.org/jira/browse/RANGER-3831
• https://issues.apache.org/jira/secure/attachment/13048029/13048029_ranger-servicedef-pegasus.json
Pegasus + Ranger 的鉴权策略
• Pegasus 集成到 Ranger
Pegasus容器化适配
第一阶段
纯容器
现在
第二阶段
容器+k8s
容器化 云原生化
• 无任何隔离
• 网络,文件系统
飞线较多
• 服务治理不完善
• 进程空间隔离
• 文件系统隔离,消除
命令文件配置飞线
• 网络软隔离,消除服
务访问飞线
• 目前计算资源无隔离
• 网络硬隔离(动态端口)
• 计算资源隔离
• 完善的资源编排
• 完善的服务管理
How to continuously improve Apache Pegasus in complex toB scenarios
新指标框架
当前指标采集存在的问题
• 指标命名冗长
• 指标类型概念并不严格界定
• 过时的指标内存空间没有释放
• 底层实现可以使用更高效的接口
可以进行的相关改进
• 简化指标命名
• 梳理当前的所有的指标,重新定义指标类型
• 过时的指标定期清理
• 底层实现可以使用更高效的接口
新指标采集框架
• Gauge类型
• Counter类型
• Percentile类型
新指标采集框架
• Counter和Percentile两种指标类型进行性能优化后的对比
thanks

More Related Content

PPTX
Apache Pegasus (incubating): A distributed key-value storage system
PPTX
How does Apache Pegasus used in SensorsData
PDF
How does the Apache Pegasus used in Advertising Data Stream in SensorsData
PPTX
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
PDF
How does Apache Pegasus used in Xiaomi's Universal Recommendation Algorithm ...
PPTX
The Introduction of Apache Pegasus 2.4.0
PPTX
How does Apache Pegasus (incubating) community develop at SensorsData
PPTX
The Design, Implementation and Open Source Way of Apache Pegasus
Apache Pegasus (incubating): A distributed key-value storage system
How does Apache Pegasus used in SensorsData
How does the Apache Pegasus used in Advertising Data Stream in SensorsData
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
How does Apache Pegasus used in Xiaomi's Universal Recommendation Algorithm ...
The Introduction of Apache Pegasus 2.4.0
How does Apache Pegasus (incubating) community develop at SensorsData
The Design, Implementation and Open Source Way of Apache Pegasus
Ad

How to continuously improve Apache Pegasus in complex toB scenarios