Discussion:
dual active 2-node cluster?
Ron Watkins
2018-04-13 10:01:11 UTC
Permalink
We are working to setup a production environment and as such one
requirement is to have as few single points of failure as possible. To that
end, I have been searching the web for how to setup a 2-node cluster where
both nodes are active. The goal is to allow both nodes to service SQL
requests (load/query) and have a load balancer in front of the database to
allow for transparent outage and node recovery.

Well, im not finding much in the way of details and would appreciate if
someone could point me to the appropriate instructions. Thanks
--
Ron Watkins
602.743.5272
Amit S.
2018-04-13 13:51:32 UTC
Permalink
You can look for hot-standby solution which would best suite your
requirements. Club it along with Pgbouncer and you will be able to get good
performance out of the setup.

Thanks, Amit
Post by Ron Watkins
We are working to setup a production environment and as such one
requirement is to have as few single points of failure as possible. To that
end, I have been searching the web for how to setup a 2-node cluster where
both nodes are active. The goal is to allow both nodes to service SQL
requests (load/query) and have a load balancer in front of the database to
allow for transparent outage and node recovery.
Well, im not finding much in the way of details and would appreciate if
someone could point me to the appropriate instructions. Thanks
--
Ron Watkins
602.743.5272
--
Amit Sharma
Laurenz Albe
2018-04-13 13:41:14 UTC
Permalink
We are working to setup a production environment and as such one requirement is to have
as few single points of failure as possible. To that end, I have been searching the web
for how to setup a 2-node cluster where both nodes are active. The goal is to allow both
nodes to service SQL requests (load/query) and have a load balancer in front of the
database to allow for transparent outage and node recovery.
You'd need synchronous replication, and if you do that with two nodes,
you'll get low availability because any outage will take down the whole
system. That's not a shortcoming, that's unavoidable.

You need at least three nodes for decent high availability, particularly
if you want load balancing.

Look into Patroni for a high availability solution.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Ron Watkins
2018-04-16 13:49:02 UTC
Permalink
What about a hot standby mode where secondary node is receiving all transactions in real (or near-real) time?
Is this doable? We have 2 physical nodes, not 3, so if we can do a hot-standby config with a load balancer configured in fail-over mode, that should work as long as no transactions are dropped and the secondary node is staying current (i.e. dual commit) with the primary node?
Does anyone know if there are any links to how to setup such a config on the web?
Ron

-----Original Message-----
From: Laurenz Albe [mailto:***@cybertec.at]
Sent: Friday, April 13, 2018 6:41 AM
To: Ron Watkins; pgsql-novice
Subject: Re: dual active 2-node cluster?
Post by Ron Watkins
We are working to setup a production environment and as such one
requirement is to have as few single points of failure as possible. To
that end, I have been searching the web for how to setup a 2-node
cluster where both nodes are active. The goal is to allow both nodes
to service SQL requests (load/query) and have a load balancer in front of the database to allow for transparent outage and node recovery.
You'd need synchronous replication, and if you do that with two nodes, you'll get low availability because any outage will take down the whole system. That's not a shortcoming, that's unavoidable.

You need at least three nodes for decent high availability, particularly if you want load balancing.

Look into Patroni for a high availability solution.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Saha, Sushanta K
2018-04-16 14:07:12 UTC
Permalink
Checkout AWS PostGres "Read Replicas".

.... Sushanta
Post by Ron Watkins
What about a hot standby mode where secondary node is receiving all
transactions in real (or near-real) time?
Is this doable? We have 2 physical nodes, not 3, so if we can do a
hot-standby config with a load balancer configured in fail-over mode, that
should work as long as no transactions are dropped and the secondary node
is staying current (i.e. dual commit) with the primary node?
Does anyone know if there are any links to how to setup such a config on the web?
Ron
-----Original Message-----
Sent: Friday, April 13, 2018 6:41 AM
To: Ron Watkins; pgsql-novice
Subject: Re: dual active 2-node cluster?
Post by Ron Watkins
We are working to setup a production environment and as such one
requirement is to have as few single points of failure as possible. To
that end, I have been searching the web for how to setup a 2-node
cluster where both nodes are active. The goal is to allow both nodes
to service SQL requests (load/query) and have a load balancer in front
of the database to allow for transparent outage and node recovery.
You'd need synchronous replication, and if you do that with two nodes,
you'll get low availability because any outage will take down the whole
system. That's not a shortcoming, that's unavoidable.
You need at least three nodes for decent high availability, particularly
if you want load balancing.
Look into Patroni for a high availability solution.
Yours,
Laurenz Albe
--
Cybertec | https://urldefense.proofpoint.com/v2/url?u=https-3A__www.
cybertec-2Dpostgresql.com&d=DwIFaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LR
xpb6__0PomBTQ&r=JaNakyvP8b5eGvWhmxll6L4SNrrqHGq3Ghe3-Mb4Nezhm-
3SiJqFhK3ICb6tsog4&m=CdDQPWdvg6lmJUbeWWGbTE5QxEnJ2UxpVmbvwvyEgLE&s=
Hxusi3pBXxW1QZhzJ-2T8a_y5ejI9QXlHmYvQoPs7b8&e=
--
*Sushanta Saha|*MTS IV-Cslt-Sys Engrg|WebIaaS_DB Group|HQ -
* VerizonWireless O 770.797.1260 C 770.714.6555 Iaas Support Line
949-286-8810*
Loading...