Re: [PoC] load balancing in libpq

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [PoC] load balancing in libpq
Дата
Msg-id CA+U5nM+HV6BtSyQoNrSDhba6Ns2Pqn+Js7sviSAFRH2T-yR8Yw@mail.gmail.com
обсуждение исходный текст
Ответ на [PoC] load balancing in libpq  (Satoshi Nagayasu <snaga@uptime.jp>)
Список pgsql-hackers
On 23 September 2012 05:50, Satoshi Nagayasu <snaga@uptime.jp> wrote:

> I have just written the first PoC code to enable load balancing
> in the libpq library.
>
> This libpq enhancement is intended to allow PostgreSQL users to
> take advantage of the replication in easier way.
>
> With using this patch, PQconnectdb() function accepts multiple
> connection info strings, and pick one of them by round-robin basis
> to connect.

It's certainly worth thinking about. New ideas are good, if they have
some justification.

A load balancing solution that only works at connection level isn't
much of a solution, IMHO.

If you have multiple connection strings in the client program, its
trivial to put them in an array and pick one randomly, then use that.
So this is already available as a solution in user space.

Also, any client based solution presumes we can ship lists of cluster
metadata to clients, which we have no solution for, so it places a
much greater burden on the administrator. Load balancing config needs
to be held more centrally.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: [PATCH] lock_timeout and common SIGALRM framework
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: pg_reorg in core?