I set up. I'm using Patroni with HAProxy on both PostgreSQL nodes, but HAProxy is masking the client's IP address that reaches PostgreSQL. How can I resolve this to ensure the correct client IP reaches PostgreSQL instead of the HAProxy's IP?
The goal is that the clients don't know the real IP address of the current primary. When a failover occurred, there are no changes necessary on the client side as HAProxy is automatically routing to the current primary. Or to a follower if your clients handle two connections, one for read only and one for writing operations. In addition it is recommended to have three nodes within Patroni.
Обсуждают сегодня