[pgpool-general: 7653] Re: Why isn't watchdog required on Kubernetes?
Bo Peng
pengbo at sraoss.co.jp
Wed Jul 28 09:41:19 JST 2021
> Does it mean, that it's safe to run multiple PG Pools on the same
> cluster without watchdog mode (so that all of the instances of PGPool
> are "active")?
Yes.
The state of PostgreSQL and Pgpool-II is managed by k8s.
k8s is in charge of health check of PostgreSQL and triggers failover.
Pgpool-II just sends queries to PostgreSQL.
You should disable watchdog, health check and failover of Pgpool-II.
All of the Pgpool-II instances are active.
> On 26.07.21 05:53, Bo Peng wrote:
> >> Hello!
> >>
> >>> Pgpool-II's health check, automatic failover, Watchdog and online
> >>> recovery features aren't required onKubernetes. You need to only
> >>> enable load balancing and connection pooling.
> >> Says this page:
> >> https://www.pgpool.net/docs/latest/en/html/example-kubernetes.html
> >> <https://www.pgpool.net/docs/latest/en/html/example-kubernetes.html>
> >>
> >> How come? Does Kubernetes somehow magically eliminate the problem of
> >> having a single point of failure in form of PGPool?
> > Pgpool is deployed as "kind: Deployment".
> > If pgpool pod goes down, Kubernetes will restart another one.
> >
> > To completely eliminate downtime, you may increase the number of "replicas".
> >
> > --------------------
> > kind: Deployment
> > metadata:
> > name: pgpool
> > spec:
> > replicas: 3
> > ...
> > --------------------
> >
> > If you are setting more than 1 replicas, you need to configure
> > "max_pool", "num_init_children", "max_connections" and
> > "superuser_reserved_connections" to satisfy:
> >
> > number of Pgpool-II replicas × max_pool × num_init_children <= (max_connections - superuser_reserved_connections)
> >
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/
More information about the pgpool-general
mailing list