Postgres replication
Postgres replication copies a primary's data to one or more standby servers, all driven by shipping WAL records. Two dimensions you pick independently: sync vs async — synchronous waits for at least one replica to confirm before committing (zero data loss on primary failure, but higher write latency and availability risk if replicas lag); asynchronous commits immediately, ships WAL in the background (near-zero overhead, up to a few ms of data loss possible on crash). Physical vs logical — physical replication copies the entire cluster byte-for-byte (all databases, all tables, same Postgres version), good for HA and read replicas; logical replication ships row-level change events for specific tables (cross-version, cross-schema, powers CDC into Kafka or Elasticsearch). The typical setup: one primary, one sync replica in the same AZ for zero-data-loss failover, and N async read replicas for scaling reads.