When deploying a Postgres DB on a VM, what should I consider when I attempt to create an HA deployment?


Postgres, OOTB, does not support Highly Availability. This requires a replication method or cloud instance, to provide this level of redundancy. When deploying the database on a VM, it is common to use synchronous/asynchronous replication to create backups and fail-over databases. Postgres works on a singular write model. This means it will only write data to one master, resulting in a replication model that will write to Read-Only databases. Because of this, when configuring an environment, the database address for the aquasec/server and aquasec/gateway should resolve to a single IP, which is the master, and is a writable database. Cloud service providers offer the most redundant databases when deploying production instances.

Major Points

  • Postgres can only write to one master and cannot load balance like other major databases (SQL/Oracle), resulting in one/multiple Read-Only database
  • Properly configure the database name resolution for consistent Aqua component communications
  • Ensure proper database fail-over steps, to ensure the database is writable before resolving to the new database IP