Report this

What is the reason for this report?

How to test database cluster automatic failover and high availability

Posted on October 14, 2020

Hi,

I have set up a PostgreSQL database cluster with 1 Primary and 1 Standby Node.

How do I test/ensure that replication between the Primary and Standby node, automatic failover and high availability are working?

Any help is appreciated.

Thanks,

Akbar



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @trarbr @trefore,

There is no option to test automatic failover to a standby node manually from your end.

All managed database clusters have automated failover, meaning they automatically detect and replace degraded or failing nodes. In order for the failover to happen, The database cluster will have primary and standby nodes.

The standby nodes maintain a copy of the primary node. In the event of a failure, The standby node is immediately promoted to primary and begins serving requests while a replacement standby node is provisioned in the background.

For more information on high availability: https://www.digitalocean.com/docs/databases/#high-availability

You can add standby nodes during cluster creation as well as to an existing database cluster.

The below link has information on how to add a standby node

https://www.digitalocean.com/docs/databases/postgresql/how-to/add-standby-nodes/

Regards, Rajkishore

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.