Hi, I have setup a postgres cluster using pg_auto_...
# general
k
Hi, I have setup a postgres cluster using pg_auto_failover...the setup has 1 monitor node and 2 DB nodes (intention is to have 1 primary and 1 standby) *connection string -postgres://DB1:5432,DB2:5432/druid?target-session-attrs=read-write* target-session-attrs=read-write helps to identify the primary server The connection string works correctly when i connect to DB via psql command...always sends requests to the primary server But specifying this connection string in druid, always sends request to the first DB instance (DB1 in this case) Any idea how to fix this issue
s
In your setup, is it possible to do a "separation of concerns" type thing? By this, I mean don't rely on druid settings to failover, but instead, make is so the one host address is all druid knows about while behind the scenes, it's actually multiple postgre servers with something else managing high availability?
k
our druid setup is relatively small, so we are just looking for a quick solution at the moment…if that’s not possible then we will consider to use HAproxy kind of tool
s
One proxy I can think of that's super easy to set up is something like nginx as an HTTP load balancer