Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 27 Nov 2023 13:01:09 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3012: Support multiple hosts defined with single hostname In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 1406126300 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: d425ed9c11bf075106ef47a65e56761b871c1be6 X-GitHub-Issue: 3012 X-GitHub-Line: 45 X-GitHub-Path: pgjdbc/src/main/java/org/postgresql/hostchooser/HostChooserFactory.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3012#discussion_r1406126300 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/main/java/org/postgresql/hostchooser/HostChooserFactory.java:45) Sure we need to remember both "hostname" and "the resolved IP address". Suppose there's "db1" which resolves to 3 IP addresses and "db2" which resolves to 15 IP addresses. Does it mean we distribute the load as 3:15? Should we distribute the load as 1:1 and then make even distribution among the IPs behind each hostname? I suggest we settle on that before adjusting the implementation.