Re: Question: Multiple pg clusters on one server can be reached with the standard port.

Поиск
Список
Период
Сортировка
От Thomas Markus
Тема Re: Question: Multiple pg clusters on one server can be reached with the standard port.
Дата
Msg-id 0894245c-d056-b9e5-62f5-c0ed39ad7ff1@proventis.net
обсуждение исходный текст
Ответ на Re: Question: Multiple pg clusters on one server can be reached with the standard port.  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Ответы Re: Question: Multiple pg clusters on one server can be reached with the standard port.
Список pgsql-general
Hi,

Am 19.06.23 um 12:33 schrieb Peter J. Holzer:
> As Francisco already pointed out, this can't work with nginx either. The
> client resolves the alias and the TCP packets only contain the IP
> address, not the alias which was used to get that address. So nginx
> simply doesn't have that information and therefore can't act on it.
>
> For HTTP this works because the HTTP protocol contains a Host field
> which the client fills with the name it used. But the Postgres protocol
> has no such information (and in any case nginx probably doesn't
> understand that protocol anyway).
>
> So (again, as Francisco already wrote) the best way is probably to write
> a simple proxy which uses the database (not DNS) name for routing. I
> seem to remember that nginx has a plugin architecture for protocols so
> it might make sense to write that as an nginx plugin instead of a
> standalone server, but that's really a judgement call the programmer has
> to make. Another possibility would of course be to extend pgbouncer to
> do what the OP needs.
>
>          hp
yeah I know
I looked at his setup definition only and missed the point that he wants 
a single entry point for all.
The image doesnt match this. Looks like a simple forward proxy definition.

anyway, fw or nginx cant look into tcp streams nor does it makes sense 
to me. Maybe without tls


Вложения

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Question: Multiple pg clusters on one server can be reached with the standard port.
Следующее
От: Dominique Devienne
Дата:
Сообщение: Re: Question: Multiple pg clusters on one server can be reached with the standard port.