Re: Multiple databases?

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Turbo Fredriksson <turbo(at)bayour(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Multiple databases?
Date: 2017-09-15 01:34:52
Message-ID: CADK3HHJj_+RiYBN2c6t9xb7NMgpem+vyO3tehK3NUK1MY610EQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer

davec(at)postgresintl(dot)com
www.postgresintl.com

On 14 September 2017 at 08:58, Turbo Fredriksson <turbo(at)bayour(dot)com> wrote:

> I’m the system administrator of our environment in AWS. We’re running
> a Scala app on there, which accesses a RDS (PostgreSQL) cluster in
> AWS.
>
> This cluster consists of one master (read/write) and several
> slaves/replicas
> (read/only).
>
> All these have a different endpoint to access them. If the master dies,
> AWS will promote one of the replicas as master automatically (if I
> understand
> the documentation correctly), but I’m not sure if it will also update the
> endpoint. I’m fairly certain it doesn’t.
>

I thought RDS kept the endpoint the same when one of the replica's dies?

>
> Meaning, the app can no longer access the DB!
>
> There’s two solutions to this:
>
> 1) Add all endpoints, after each other, in the config.
> 2) Add a DNS round-robin entry with all endpoints.
>
> For point one, will the driver only try subsequent endpoints/DBs IF the
> first fails? As in, no load balancing :(.
>
> The driver doesn't do load balancing.

> For point two, my question is (and my developer don’t know and don’t have
> time to dig into this - he have googled, but have not found a determinate
> answer) is if the pgsql-jdbc driver can recognise which of these are the
> master
> automatically. As in, does it “know” which one it can write to?
>
> Yes, it does know when it connects but if that situation changes it will
not be able to figure it out

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2017-09-15 06:55:40 Re: Multiple databases?
Previous Message Michael Paquier 2017-09-14 22:11:25 Re: [JDBC] Channel binding support for SCRAM-SHA-256