Performance Trade-offs of Synchronous and Asynchronous Replication in Patroni-based PostgreSQL Clusters - I Putu Suwidnyana Putra; I Nyoman Gede Arya Astawa; Luh Gede Putri Suardani (Jurnal Teknologi Informasi dan Pendidikan, 2026)
This research aims to evaluate the effectiveness of High Availability (HA) architectures and analyze the performance trade-offs of database replication modes in critical environments. The study employs an experimental method using a distributed cluster consisting of four virtualized nodes. PostgreSQL is used as the core database, orchestrated by Patroni and Etcd for failover management, with HAProxy as the load balancer. Performance was measured using pgbench with TPC-B standards under varying concurrent loads (10, 50, and 100 clients). The results demonstrate that the Patroni cluster successfully performed auto-failover with an average Recovery Time Objective (RTO) of under 30 seconds in normal conditions, which increased to 75 seconds during peak workloads due to resource contention. Benchmarking reveals that Asynchronous replication achieved a peak throughput of 247 ops/s, while Synchronous replication guaranteed absolute data integrity (RPO=0) but incurred a significant latency increase, reaching 21.36 seconds under a 30-client load due to 99.5% CPU saturation. This study concludes that the proposed architecture effectively eliminates Single Point of Failure (SPOF), providing a critical reference for system architects in balancing transactional speed and data consistency.