loadBalanceHosts and weighted server selection

Поиск
Список
Период
Сортировка
От Michael Charnoky
Тема loadBalanceHosts and weighted server selection
Дата
Msg-id CAEWrP=k88RCdQoCkLZ7-NOf4_UvMRq5dAinPqjQ=R4DoOsG88A@mail.gmail.com
обсуждение исходный текст
Список pgsql-jdbc
Hi, we'd like to take advantage of the "loadBalanceHosts" feature of the jdbc driver. The only hitch is that we'd like to have the driver prefer one host over the other based on some sort of "weight". Ideally the driver would choose hostA 2/3 of the time and the hostB 1/3 of the time (all queries are read-only). Can we achieve this by specifying hostA twice in the jdbc url? For example, would this work?

jdbc:postgresql://hostA,hostA,hostB/dbname?loadBalanceHosts=true

Thanks,
noky

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

Предыдущее
От: Martin Pärtel
Дата:
Сообщение: Re: Clarification on thread-safety
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Clarification on thread-safety