Dragonfly 最新正式版本 v2.0.9 已经发布!

207 阅读5分钟

作者:戚文博-蚂蚁集团

Dragonfly 最新正式版本 v2.0.9 已经发布!感谢 Dragonfly 的贡献者们,同时也感谢默默支持 Dragonfly 项目的各个公有云团队。欢迎访问 d7y.io [ 1] 网站来了解详情,下面具体介绍 v2.0.9 版本带来了那些更新。

image.png

功能

  • 下载任务可以根据优先级(Priority)进行下载。优先级可以在下载任务时 cli 中作为参数传入,也可以在 Manager Console 设置对应应用关联的优先级。具体不同优先级的功能可以参考文档 priority protoc definition [ 2]
  • Scheduler 配置新增 PieceDownloadTimeout 字段,做用是当某个 Piece 下载超过 Timeout 时,设置对应的 Task 状态变更为失败。防止异常 Task 元信息残留在 Scheduler 中。
  • GRPC 服务新增 Health Service 和 Reflection 服务。
  • Manager 支持 Redis 哨兵模式(sentinal model)。
  • 重构 Dynconfig 模块移除 json.Unmarshal 操作,提高 Dynconfig 模块运行时效率。并且支持通过健康检查的方式过滤异常地址服务。
  • 修复当无可用服务时,GRPC 未构建哈希环所造成的异常。
  • 早期版本当同一个 Task 的多个 Piece 并发下载时,Scheduler 会调度多个 Parent 给当前 Peer 进行下载,但多个 Piece 基本都会从单个 Parent 进行下载。当前版本更改多个 Piece 可以从不同的 Parent 并发下载,可以防止流量集中在部分热点 Parent,提高下载效率同时也提高了带宽平均利用率。
  • Peer 调用 Manager 获取匹配的 Scheduler Cluster 的时候,如果没有匹配到任何 Scheduler Cluster,那么 Manager 会返回所有的 Scheduler Cluster 提供给 Peer。Peer 会使用 Health Check 通过的 Scheduler Cluster 地址供后续下载调度使用。
  • 支持 ORAS [ 3] 客户端的回源下载协议,扩展容器镜像生态支持。
  • 增加 UDP Ping 包的支持和虚拟网络拓扑的 GRPC Protoc 定义。未来会新增基于网络探测构建虚拟网络拓扑结构,提高调度算法的精确度。
  • 完成 V2 版本的 P2P 协议 [ 4] 的定义。Scheduler 和 Manager 对应实现了 V2 版本的 P2P 协议的功能。未来会基于 V2 版本的 P2P 协议和 Rust 语言重写 Dfdaemon,提高客户端性能的同时能够依赖更加标准且扩展性更强的 V2 版本的 P2P 协议。
  • OSS 客户端回源协议新增基于 STS 临时访问凭证来访问 OSS 源站。
  • Scheduler 新增 hostTTL and hostGCInterval 配置,主要作用于 Host 元数据的释放。可以保证在 Peer 主机异常退出的情况下,仍然可以释放掉异常的 Host 元数据,防止脏数据残留。
  • Manager 的 Searcher 模块新增根据 CIDR [ 5] 条件去筛选当前 Peer 匹配的 Scheduler Cluster,提供更精确的匹配计算方式。
  • 重构 V1 版本 P2P 协议的 Metric,并且新增 V2 版本 P2P 协议的 Metric,并且根据新的 Metrics 更新 Helm Charts [ 6] 的 PrometheusRule 对应的告警规则。并且重新整理 Dragonfly Grafana Dashboards [ 7] 方便用户可以一键导入 Dashboards 观测 P2P 网络流量以及服务相关数据。具体文档可以参考 Monitoring [ 8] , Grafana Dashboard 维护在项目 dragonflyoss/monitoring [ 9] 中。

版本更新包含的更多细节可以参考 CHANGELOG [ 10]

破坏性变更

老版本 Manager 由于使用了默认的 JWT Key 生成 JWT Token 会引起安全性问题,具体可以参考 security issues [ 11] 。所以 Manager 服务配置文件新增了 JWT 配置 [ 12] 。所以当老版本 Manager 升级过程中需要在新版本 Manager 的配置文件中新增 JWT Key 配置,并且 JWT Key 是需要用户自己生成,具体 JWT Key 如何配置可以参考 setting it in the Manager configuration [ 13]

公有云厂商支持

  • Alibaba Cloud(阿里云) - 阿里云提供安装 Dragonfly 1.x 在容器镜像仓库 Container Registry [ 14] ,使用文档可以参考 Use P2P Acceleration in ASK [ 15] 。推荐使用更加高效且稳定的 Dragonfly 2.0 [ 16] ,部署文档参考 Setup Dragonfly in Kubernetes [ 17]
  • Google Cloud Platform(GCP) - GCP 提供一键点击部署 Dragonfly 在 Google Kubernetes Engine(GKE) [ 18] 的 Marketplace [ 19] ,具体文档可以参考 Click to Deploy Dragonfly [ 20]
  • Volcano Engine(火山引擎) - 火山引擎在容器服务(VKE) and 和镜像仓库(CR)中集成了 CNCF 孵化项目 Dragonfly,欢迎访问 VKE [21 ] & CR [ 22] 了解更多。
  • Baidu AI Cloud(百度智能云) - 百度智能云提供在 Cloud Container Engine(CCE) [2****3] 一键部署 P2P 加速服务,其能力来自于 Dragonfly。

参考链接

  • Dragonfly 官网

d7y.io/

  • Dragonfly 仓库

github.com/dragonflyos…

  • Dragonfly Charts 仓库

github.com/dragonflyos…

  • Dragonfly Monitor 仓库

github.com/dragonflyos…

  • 阿里云容器仓库

www.alibabacloud.com/product/con…

  • 阿里云容器服务(ACK)

www.alibabacloud.com/product/kub…

  • Google Kubernetes Engine(GKE)

cloud.google.com/kubernetes-…

  • Google Cloud Platform(GCP) Dragonfly Marketplace

console.cloud.google.com/marketplace…

  • 火山引擎容器服务(VKE)

www.volcengine.com/product/vke

  • 火山引擎容器仓库(CR)

www.volcengine.com/product/cr

  • 百度智能云容器服务(CCE)

intl.cloud.baidu.com/product/cce…

**
**

相关链接:

[1] Dragonfly 官网

d7y.io/

[2] priority protoc definition

github.com/dragonflyos…

[3] ORAS

github.com/oras-projec…

[4] V2 版本的 P2P 协议

github.com/dragonflyos…

[5] CIDR

en.wikipedia.org/wiki/Classl…

[6] Helm Charts

github.com/dragonflyos…

[7] Dragonfly Grafana Dashboards

grafana.com/grafana/das…

[8] Monitoring

d7y.io/docs/concep…

[9] Dragonfly Monitor

github.com/dragonflyos…

[10] CHANGELOG

github.com/dragonflyos…

[11] security issues

github.com/dragonflyos…

[12] JWT 配置

github.com/dragonflyos…

[13] setting it in the Manager configuration

github.com/dragonflyos…

[14] 阿里云镜像仓库

www.alibabacloud.com/product/con…

[15] Use P2P Acceleration in ASK

www.alibabacloud.com/help/en/con…

[16] Dragonfly 仓库

github.com/dragonflyos…

[17] Setup Dragonfly in Kubernetes

d7y.io/docs/gettin…

[18] Google Kubernetes Engine(GKE)

cloud.google.com/kubernetes-…

[19] Google Cloud Platform(GCP) Marketplace

console.cloud.google.com/marketplace…

[20] Google Cloud Platform(GCP) Dragonfly Marketplace*console.cloud.google.com/marketplace…*

[21] 火山引擎容器服务(VKE)

www.volcengine.com/product/vke

[22] 火山引擎镜像仓库(CR)

www.volcengine.com/product/cr

[23] 百度智能云容器服务(CCE)

intl.cloud.baidu.com/product/cce…