reverse proxy to postgresql with haproxy

Поиск
Список
Период
Сортировка
От Aviel Buskila
Тема reverse proxy to postgresql with haproxy
Дата
Msg-id CAB3=tTE1sEMaCK9m=YLmrHFy06U04yBEZxCe99aemrDAUACfKw@mail.gmail.com
обсуждение исходный текст
Ответы Re: reverse proxy to postgresql with haproxy  (Scott R Mead <scottm@openscg.com>)
Список pgsql-general
Hey everyone, 
I am trying to configure reverse proxy to postgresql using haproxy, for this example I have the following architecture:
- node1
- node2 
- haproxysrv

Streaming replication between node1 and node2 and auto failover with repmgr.

When I issue a connection to haproxysrv to connect, I get a pg_hba.conf error telling that I haven't configured the haproxysrv to connect to the database. 

The reason that this scenario occurs is that:
HAProxy establishes 2 separate connections, 1 between the client and haproxy and one between haproxy and postgresql. the connection made haproxy haproxy and postgresql contains source ip of the haproxy itself.

HAProxy offers a "transparent" ip using proxy protocol.

According to haproxy docs and forums this feature is feasible only if the application is proxy protocol aware.

My question are:
1. is there any other solution for this issue?
2. is there anyone who knows if postgresql is proxy protocol aware?

Best regards,
Aviel B.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Fatal error when not numeric value - PostgreSQL 9.2
Следующее
От: arnaud gaboury
Дата:
Сообщение: Re: query from two tables & concat the result