Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Idea : Support Read Replicas

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, node.js, postgresql
領域
backend, databases

調査の方向性

まず 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

  1. 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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

brianc/node-postgres のほかの issue

brianc/node-postgres の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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