No source of entropy in _get_nearest_mirrors_by_network_data()
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- api, backend, performance
調査の方向性
src/backend/api/handlers.py の _get_nearest_mirrors_by_network_data()(73行目付近)から始め、ネットワークに一致する mirror と地理的に選択された mirror がどのように組み立てられるかを追跡します。推奨されている2つのシャッフル手順を既存の長さ制限と比較します。対象となるクライアントが多様な mirror の順序を受け取り、なおかつ提示されるリストが意図したサイズを満たしていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L73
When a client matches the network data service cone for any mirror, the offered mirror list is built using the following logic:
- Append mirror matching on ASN or subnet
- Create sorted list of mirrors by distance, filter out mirrors matching on first criteria, and extend list to desired minimum (LENGTH_CLOUD_MIRRORS_LIST)
The issue is that this process is completely deterministic and there is no load balancing for clients that match on any mirror's network service cone. There is no shuffling happening in either the first list of suitable_mirrors or the geographically based extension of the list to meet the minimum number of mirrors to offer.
Failure modes:
- A particularly large install base of hosts relies on a local mirror. When this mirror goes offline and before the health checkers have disqualified this mirror, ALL clients on the local subnet are steered to the next closest public mirror.
- An EXTREMELY large install base of hosts with two local mirrors are not able to load balance between the two mirrors. The list of mirrors is always returned in the same order (probably based on the order they happened to be added to the mirror database)
Recommendation:
- Shuffle list of mirrors which match on network data before the geographically based extension of the list.
- Generate a longer geographic extension of the list, shuffle, and then use to extend the original list. i.e. find the
2 * LENGTH_CLOUD_MIRRORS_LISTclosest mirrors, shuffle this list, thensuitable_mirrors.extend(nearby_mirrors_shuffled)[:LENGTH_CLOUD_MIRRORS_LIST - len(suitable_mirrors)]
- 主要言語
- Python
- スター
- 93
- フォーク
- 486
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AlmaLinux/mirrors のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Mirrorlist should deal with unmatched, slightly incorrect versions and multiple minors for one majorオープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AlmaLinux/mirrors の issue をすべて見る
似ている issue
-
approved Good First Issue scope: docs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
hiero-ledger/hiero-sdk-python#2730 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
wemake-services/wemake-django-template#3178 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docling-project/docling#4846 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
neurostuff/NiMARE#1181 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pytest-dev/pytest#15180 ·
メンテナーはふだん 1 日以内に返信