jackc / jackc/pgx

Round Robin Query Support when Multiple Hosts are defined

Open
#1,382 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

First off thanks to @furdarius for the multiple host support in https://github.com/jackc/pgx/pull/545

I'm using this to connect to a CrateDB cluster I'd like to distribute query traffic across multiple nodes in the cluster rather than connecting to just a single node and failing over if that node goes down.

This could also be useful for distributing queries across different Postgres slave nodes so that you don't saturate a single node.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the multiple-host support in PR 545 and tracing how the current connection selects among hosts. Confirm the desired behavior for CrateDB and PostgreSQL slave nodes, then verify that query traffic is distributed round robin while retaining failover behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgres
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.