Re: [JDBC] Multiple databases?

Поиск
Список
Период
Сортировка
От Turbo Fredriksson
Тема Re: [JDBC] Multiple databases?
Дата
Msg-id F82247A7-1AE8-4812-96D5-0AC3E83E2437@bayour.com
обсуждение исходный текст
Ответ на Re: [JDBC] Multiple databases?  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
On 15 Sep 2017, at 02:34, Dave Cramer <pg@fastcrypt.com> wrote:

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

I’m not sure and I don’t know how to test this. I can’t just stop the master.
AWS refuses to if/when there’s replicas to it. I can “delete” it, but that won’t
do anything to any of the replicas that I have seen. No promotion and no
changing of endpoint address.

And from what I remember, the only thing the documentation say about
a crashed master is that “AWS will automatically promote one of the replicas
to new master”. It doesn’t say if the endpoint changes with it.

But considering that the DB instance name is part of the endpoint address,
I doubt it WILL change!

> The driver doesn't do load balancing.

Ok, thanx. So how does that work if I add multiple DB endpoints? It will
only use the first one, in a read/write capacity? What if that one stops
responding, will the driver then try the next endpoint?

Will the driver be “smart” enough to recognise that this is a read/only
DB and not do writes? Or will it try again with the next in line (third one)?

> Yes, it does know when it connects but if that situation changes it will not be able to figure it out

Ok, so as long as one uses non-persistent DB connection and open up
a connection every time it’s needed, this should “hopefully” work?


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: [JDBC] Multiple databases?
Следующее
От: Turbo Fredriksson
Дата:
Сообщение: Re: [JDBC] Multiple databases?