Use watch for Kubernetes strategy

オープン
#139 コメント 3 件 リアクション 8 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
elixir, kubernetes

調査の方向性

まず、既存の Cluster.Strategy.Kubernetes モジュールと Kubernetes の watch 動作を確認し、issue で提起されているバージョン互換性の懸念も含めて検討します。そのモジュールを拡張する場合と Cluster.Strategy.KubernetesWatched を作成する場合を比較し、実装前に欠点と API の範囲を明確にします。完了条件は、モジュール戦略が決定され、現在のポーリング方式を使わずにノードリストをほぼリアルタイムで更新できることです。

索引モデルが issue の本文から書いたものです。

説明

Thanks for creating an amazing library that makes clustering so much simpler!

Kubernetes has the ability to watch a given resource. When it is watched, the transfer encoding is set to chunked, and any updates after the specified version will be sent down in new chunks. This way the node wouldn't have to poll the endpoint every 5 seconds, but could create a long-lived connection to it and then just update whenever new chunks are received. I believe this would allow for node list updates to occur much closer to real-time.

Are there any drawbacks to supporting watch requests?

Would there be support for a PR implementing this?

If yes, would it make more sense to update the existing Cluster.Strategy.Kubernetes module or to create a new one like Cluster.Strategy.KubernetesWatched or something like that?

It seems like the high-level functionality will be exactly the same but more performant. That being said, I don't know when the watch capability was added to Kubernetes, so there is potential that it would be a breaking change for those who might be on older version. The docs reference watch in version 1.14, but I haven't looked further back than that.

主要言語
Elixir
スター
2.2k
フォーク
202
平均マージ
2分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bitwalker/libcluster のほかの issue

bitwalker/libcluster の issue をすべて見る

似ている issue

Elixir の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。