pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPgBouncer - HA Mode
3+ messages / 3 participants
[nested] [flat]
* PgBouncer - HA Mode
@ 2020-02-17 10:42 Anjul Tyagi <anjul@ibosstech-us.com>
0 siblings, 2 replies; 3+ messages in thread
From: Anjul Tyagi @ 2020-02-17 10:42 UTC (permalink / raw)
To: pgsql-admin
Team,
we are using PgBouncer for connection pooling, now all are application
is connecting database via PgBouncer. However I need suggestion, if some
how VM goes down or something goes wrong with PgBouncer, how can we
handle that situation. We observe that currently its a single point of
failure for all application if PgBouncer goes down.
Is there any kind of load balancer or replicate the PgBouncer ti manage
the high availability?
Thanks in advance.
Regards,
Anjul TYAGI
ü Go Green
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PgBouncer - HA Mode
@ 2020-02-17 12:04 Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
parent: Anjul Tyagi <anjul@ibosstech-us.com>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2020-02-17 12:04 UTC (permalink / raw)
To: Anjul Tyagi <anjul@ibosstech-us.com>; pgsql-admin
On 2020-02-17 11:42, Anjul Tyagi wrote:
> we are using PgBouncer for connection pooling, now all are application
> is connecting database via PgBouncer. However I need suggestion, if some
> how VM goes down or something goes wrong with PgBouncer, how can we
> handle that situation. We observe that currently its a single point of
> failure for all application if PgBouncer goes down.
>
> Is there any kind of load balancer or replicate the PgBouncer ti manage
> the high availability?
A typical approach is to run several pgbouncer instances on separate
hosts and use a TCP/IP-level load balancer (e.g., hardware load balancer
or HAProxy) to route traffic.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PgBouncer - HA Mode
@ 2020-02-17 12:42 soumitra bhandary <soumitra.bhandary@hotmail.com>
parent: Anjul Tyagi <anjul@ibosstech-us.com>
1 sibling, 0 replies; 3+ messages in thread
From: soumitra bhandary @ 2020-02-17 12:42 UTC (permalink / raw)
To: Anjul Tyagi <anjul@ibosstech-us.com>; +Cc: pgsql-admin
PgBouncer does not have internal failover-host configuration nor detection. It is possible via some external tools:
1. DNS reconfiguration - when ip behind DNS name is reconfigured, pgbouncer will reconnect to new server. This behaviour can be tuned via 2 config parameters - dns_max_ttl tunes lifetime for one hostname, and dns_zone_check_period tunes how often zone SOA will be queried for changes. If zone SOA record has changed, pgbouncer will re-query all hostnames under that zone.
2. Write new host to config and let PgBouncer reload it - send SIGHUP or use RELOAD; command on console. PgBouncer will detect changed host config and reconnect to new server.
Or else
You can go for haproxy
Sent from my iPhone
On 17-Feb-2020, at 4:12 PM, Anjul Tyagi <anjul@ibosstech-us.com> wrote:
Team,
we are using PgBouncer for connection pooling, now all are application is connecting database via PgBouncer. However I need suggestion, if some how VM goes down or something goes wrong with PgBouncer, how can we handle that situation. We observe that currently its a single point of failure for all application if PgBouncer goes down.
Is there any kind of load balancer or replicate the PgBouncer ti manage the high availability?
Thanks in advance.
Regards,
Anjul TYAGI
ü Go Green
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-02-17 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 10:42 PgBouncer - HA Mode Anjul Tyagi <anjul@ibosstech-us.com>
2020-02-17 12:04 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-02-17 12:42 ` soumitra bhandary <soumitra.bhandary@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox