Feature Idea : Support Read Replicas
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js, postgresql
調査の方向性
まず pg-pool の constructor、connect、query API を確認し、次に現在のクライアント選択と接続管理の仕組みを調べます。サポートする read-replica の構成と読み取り/書き込みのルーティング動作を定義します。これには、呼び出し側が isWrite を渡すのか、クエリを解析するのかも含まれます。完了条件は、既存の単一クラスター利用を壊さずにマルチクラスターのプーリングが機能することです。
索引モデルが issue の本文から書いたものです。
説明
node-postgres handles connection pooling seemlessly with a single cluster
Although it doesn't have support for multi cluster connection management
This will be useful in production deployments having multiple read replicas with a single master cluster used with write operations
Idea :
Allow a list of read clusters to be specified with pg-pool
with pg-pool handling connection management with multi-clusters automatically
Implementation Approach :
pg-pool has a constructor accepting a list of endpoints for read replicas , primary cluster ( used with write )
Internally A MultiClient Pool Manager will maintain the list of clients with public methods for picking a client for read or write
Client Pick Strategy For Read :
MultiClientPool will pick a cluster which has an idle connection if available , else it will resolve to creating a new connection by picking the one with min active connections
pg-pool has connect , query methods used by end clients , clients can have an option to specify an operation as read or write
Ex : through a parameter isWrite ,
pg-pool passes the parameter to MultiClientPool to pick a cluster
Alternative Approach to read-write detection
- Implement a parser to auto identify a query as read or write
For Projects
It simplifies scaling read heavy workloads through usage of multi clusters
- 主要言語
- JavaScript
- スター
- 13.2k
- フォーク
- 1.4k
- 平均マージ
- 6日 15時間
- マージ済み PR(30日)
- 6
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
brianc/node-postgres のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
brianc/node-postgres#3770 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
brianc/node-postgres#3716 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
brianc/node-postgres#3631 · コメント 1 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
brianc/node-postgres#2857 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
brianc/node-postgres#2433 ·
brianc/node-postgres の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
antfu-collective/icones#398 ·
-
ECmail.com オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
wesbos/burner-email-providers#554 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#92 ·