Dragonfly 最新版本 v2.0.9 釋出

SOFAStack發表於2023-03-31

圖片

圖片

Dragonfly 最新正式版本 v2.0.9 已經發布!感謝 Dragonfly 的貢獻者們,同時也感謝默默支援 Dragonfly 專案的各個公有云團隊。歡迎訪問 d7y.io[1] 網站來了解詳情,下面具體介紹 v2.0.9 版本帶來了那些更新。

圖片

功能

1、下載任務可以根據優先順序(Priority)進行下載。優先順序可以在下載任務時 Cli 中作為引數傳入,也可以在 Manager Console 設定對應應用關聯的優先順序。具體不同優先順序的功能可以參考文件 priority protoc definition[2] 。

2、Scheduler 配置新增 PieceDownloadTimeout 欄位,做用是當某個 Piece 下載超過 Timeout 時,設定對應的 Task 狀態變更為失敗。防止異常 Task 元資訊殘留在 Scheduler 中。

3、gRPC 服務新增 Health Service 和 Reflection 服務。

4、Manager 支援 Redis 哨兵模式(sentinal model)

5、重構 Dynconfig 模組移除 json.Unmarshal 操作,提高 Dynconfig 模組執行時效率。並且支援透過健康檢查的方式過濾異常地址服務。

6、修復當前無可用服務時,gRPC 未構建雜湊環所造成的異常。

7、早期版本當同一個 Task 的多個 Piece 併發下載時,Scheduler 會排程多個 Parent 給當前 Peer 進行下載,但多個 Piece 基本都會從單個 Parent 進行下載。當前版本更改多個 Piece 可以從不同的 Parent 併發下載,可以防止流量集中在部分熱點 Parent,提高下載效率的同時也提高了頻寬平均利用率。

8、Peer 呼叫 Manager 獲取匹配的 Scheduler Cluster 的時候。如果沒有匹配到任何 Scheduler Cluster,那麼 Manager 會返回所有的 Scheduler Cluster 提供給 Peer。Peer 會使用 Health Check 透過的 Scheduler Cluster 地址供後續下載排程使用。

9、支援 ORAS[3] 網客戶端的回源下載協議,擴充套件容器映象生態支援。

10、增加 UDP Ping 包的支援和虛擬網路拓撲的 gRPC Protoc 定義。未來會新增基於網路探測構建虛擬網路拓撲結構,提高排程演算法的精確度。

11、完成 V2 版本的 P2P 協議[4] 網的定義。Scheduler 和 Manager 對應實現了 V2 版本的 P2P 協議的功能。未來會基於 V2 版本的 P2P 協議和 Rust 語言重寫 Dfdaemon,提高客戶端效能的同時能夠依賴更加標準且擴充套件性更強的 V2 版本的 P2P 協議。

12、OSS 客戶端回源協議新增基於 STS 臨時訪問憑證來訪問 OSS 源站。

13、Scheduler 新增 Host TTLandhostGCInterval 配置,主要作用於 Host 後設資料的釋放。可以保證在 Peer 主機異常退出的情況下,仍然可以釋放掉異常的 Host 後設資料,防止髒資料殘留。

14、Manager 的 Searcher 模組新增根據 CIDR[5] 條件去篩選當前 Peer 匹配的 Scheduler Cluster,提供更精確的匹配計算方式。

15、重構 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] 瞭解更多。

Baiidu AI Cloud(百度智慧雲)- 百度智慧雲提供在 Cloud Container Engine(CCE)[24] 一鍵部署 P2P 加速服務,其能力來自於 Dragonfly。

|相關連結|

Dragonfly 社群官網網站:

[1] Dragonfly 官網:https://d7y.io/
[2] Priority Protoc Definition:https://github.com/dragonflyoss/api/blob/main/pkg/apis/common/v2/common.proto#L74
[3] ORAS:https://github.com/oras-project/oras
[4] V2 版本的 P2P 協議:https://github.com/dragonflyoss/api/tree/main/proto
[5] CIDR:https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
[6] Helm Charts:https://github.com/dragonflyoss/helm-charts
[7] Dragonfly Grafana Dashboards:https://grafana.com/grafana/dashboards/?search=dragonfly
[8] Monitoring:https://d7y.io/docs/concepts/observability/monitoring
[9] Dragonfly Monitor:https://github.com/dragonflyoss/monitoring
[10] ChangeLog:https://github.com/dragonflyoss/Dragonfly2/blob/main/CHANGELOG.md
[11] Security issues:https://github.com/dragonflyoss/Dragonfly2/security/advisories/GHSA-hpc8-7wpm-889w
[12] JWT 配置:https://github.com/dragonflyoss/Dragonfly2/pull/2161
[13] Setting it in the Manager configuration:https://github.com/dragonflyoss/d7y.io/blob/main/docs/reference/configuration/manager.md?plain=1#L56
[14] 阿里雲映象倉庫:https://www.alibabacloud.com/product/container-registry
[15] Use P2P Acceleration in ASK:https://www.alibabacloud.com/help/en/container-registry/lates...
[16] Dragonfly 倉庫:https://github.com/dragonflyoss/Dragonfly2
[17] Setup Dragonfly in Kubernetes:https://d7y.io/docs/getting-started/quick-start/kubernetes/
[18] Google Kubernetes Engine(GKE):https://cloud.google.com/kubernetes-engine
[19] Google Cloud Platform(GCP)Marketplace:https://console.cloud.google.com/marketplace/product/google/d...
[20] Google Cloud Platform(GCP)Dragonfly Marketplace:https://console.cloud.google.com/marketplace/product/google/d...
[21] 火山引擎容器服務(VKE):https://www.volcengine.com/product/vke
[22] 火山引擎映象倉庫(CR):https://www.volcengine.com/product/cr
[23] 百度智慧雲容器服務(CCE):https://intl.cloud.baidu.com/product/cce.html
[24]Dragonfly 官網:https://d7y.io/
[25]Dragonfly Charts 倉庫:https://github.com/dragonflyoss/helm-charts
[26]Dragonfly Monitor 倉庫:https://github.com/dragonflyoss/monitoring
[27]阿里雲容器倉庫:https://www.alibabacloud.com/product/container-registry
[28]阿里雲容器服務(ACK)https://www.alibabacloud.com/product/kubernetes
[29]Google Kubernetes Engine(GKE)https://cloud.google.com/kubernetes-engine
[30]Google Cloud Platform(GCP)Dragonfly Marketplace:https://console.cloud.google.com/marketplace/product/google/d...
[31]火山引擎容器服務(VKE)https://www.volcengine.com/product/vke
[32]火山引擎容器倉庫(CR)https://www.volcengine.com/product/cr
[33]百度智慧雲容器服務(CCE)https://intl.cloud.baidu.com/product/cce.html

Dragonfly Star 一下✨:
https://github.com/dragonflyoss/Dragonfly2

本週推薦閱讀

圖片

Dragonfly 基於 P2P 的檔案和映象分發系統

圖片

Dragonfly 中 P2P 傳輸協議最佳化

圖片

Occlum Meetup - 一起來聊機密計算 TEE

圖片

展臺招募|“SOFA 五週年”開源集市等你來!

相關文章