2

Backstory: I am unable to use RDS, as I need to install cartridges in my PostgreSQL instances.

I have been trying to pin down an architecture for PostgreSQL running on EC2 instances for a few days. Most information I could find online use separate software tools like HAProxy or PGPool, or more fully fledged DB clustering products like ClusterControl.

Question: Can't a highly available PostgreSQL DB be set up on AWS without any software load balancers, cluster management tools, etc?

So far I have come up with the following architecture which I think would work. There is some custom coding required in the Lambda layer to update the PostgreSQL replication slots whenever EC2s are terminated / started - there is no escaping this since PostgreSQL does not come with built in failover mechanism.

architecture-diagram

Notes:

tjwoon
  • 29
  • 1

0 Answers0