How High Availability Works
In a highly available configuration, ParadeDB deploys as a cluster of Postgres instances. One instance is designated as the primary while the other instances are designated as standby instances. The primary server sends write-ahead logs (WAL) to the standby servers, which replicate the primary by replaying these logs. If the primary server goes down, a standby server is promoted to become the new primary server. This process is called failover. For a thorough architecture overview, please consult the CloudNativePG Architecture documentation.Enable High Availability
Prior to starting the CNPG cluster, modify thevalues.yaml file to increase the number of instances.
ParadeDB Enterprise
instances - 1. Having at least 3 instances guarantees that a standby will be available even while a failover process is occurring.
Synchronous Replication
Between physical replicas, ParadeDB requires the use of a few settings (which are automatically set by CNPG) in order to avoid query cancellation due to ongoing reorganization of the data on the primary replica.hot_standby_feedback=on- Thehot_standby_feedbacksetting controls whether nodes acting ashot_standbys (the replicas in physical replication) send feedback to the leader about their current transaction status. ParadeDB uses this transaction status to determine when it is safe for the primary to garbage collect its segments.primary_slot_name=$something- Theprimary_slot_namesetting declares the name of the replication slot that a replica should use when it connects to the primary. In order forhot_standby_feedbackto be used and persistent, a replication slot must be used.