High Availability (HA) PostgreSQL plans at ElephantSQL

By Lovisa Johansson - posted High Availability (HA) PostgreSQL plans at ElephantSQL

PostgreSQL High Availability (HA) plans are now available at ElephantSQL! A database on an HA plan will be created with a follower and has automatic failover in the face of hardware or software failure.

A follower to your database is another database (another node) that has a read-only copy of the master database. The follower will stay up-to-date with the master database data. All modification of the data, write/update/deletes are committed to the master database and the changes are streamed to the follower database.

You can use followers when you want to spread selects across multiple servers. Or when you want to have a hot-standby ready to take over if you main database crashes. The follower to a database is physically located in a different availability zone (AZ), to protect against AZ-wide failures.

The follower will be promoted automatically by ElephantSQL in situations where the primary database becomes corrupted or unavailable. Failover is set to 30 seconds. You are also able to manually promote the follower as master from the console.

Read only database

The address to the follower of your master node can be found in "details" for your instance (e.g. seasoned-mango-read.db.elephantsql.com).

It's important to reconnect the clients when they are being disconnected during failover. This is handled differently in different client libraries. Some libs need to create a new connection while other client libraries are handling the failover.

If you have any questions, comments or need feedback, please do not hesitate to contact us at support@elephantsql.com .