Performance Trade-offs of Synchronous and Asynchronous Replication in Patroni-based PostgreSQL Clusters

Authors

  • I Putu Suwidnyana Putra Politeknik Negeri Bali
  • I Nyoman Gede Arya Astawa Politeknik Negeri Bali
  • Luh Gede Putri Suardani Politeknik Negeri Bali

DOI:

https://doi.org/10.24036/jtip.v19i2.1129

Keywords:

High Availability, PostgreSQL, Patroni, Replication, Failover, TPC-B

Abstract

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.

References

R. Pratama, "Pengaruh infrastruktur high availability terhadap kinerja dan responsivitas web server di google cloud platform: analisis perbandingan," Skripsi, Universitas Muhammadiyah Surakarta, Surakarta, 2023.

W. A. Yuliono and A. Prihanto, "Sinergi replikasi server dan sistem failover pada database server untuk mereduksi downtime disaster recovery planing (drp)," Journal of Informatics and Computer Science (JINACS), vol. 3, no. 1, pp. 29-38, 2021.

S. H. Ahsana, M. B. Syahputra, A. F. F. M. Putri, and A. A. Prasetyo, "Analisis perbandingan performa antara mysql dan postgresql," dalam Prosiding Seminar Nasional Teknologi dan Sistem Informasi (SITASI) 2023, Surabaya, 2023, pp. 13-18.

I. Ollong and D. S. Kusumo, "Development of high availability database infrastructure for oss projects with monitoring systems in cloud computing environments," International Journal on ICT, vol. 9, no. 2, pp. 41-52, 2023.

F. S. Musthofa, "Rancang bangun sistem monitoring performa database server postgresql dengan notifikasi email menggunakan zabbix yang terintegrasi grafana," Skripsi, Politeknik Negeri Jakarta, Depok, 2023.

E. S. Alim, "Implementasi load balancing pada google cloud platform," Jurnal Teknik Informatika, vol. 8, no. 1, 2025.

D. Irwan, dkk., "Service high availability pada native server dan virtual server menggunakan proxmox," Jurnal Teknologi Informasi, vol. 6, no. 2, 2020.

M. Rafli and A. Aryo, "Analisis perbandingan efisiensi metode trigger, timestamp dan log-based cdc," Jurnal Pengembangan Teknologi Informasi, vol. 2, no. 5, 2017.

M. Suryanto, "Implementasi clustering database server menggunakan pgcluster untuk optimalisasi kinerja sistem basis data," Jurnal Khatulistiwa Informatika, vol. 3, no. 2, 2015.

Asriyar and U. Sutendi, "Implementasi sistem replikasi database postgresql master slave repmgr," Jurnal Teknologi Informasi dan Komunikasi, vol. 7, no. 1, 2019.

L. Wulandari, dkk., "Infrastruktur high-available lms universitas menggunakan least connected lb," Jurnal Sistem Informasi, vol. 10, no. 2, 2022.

Muliawan and D. Iskandar, "Penerapan replikasi synchronous pada aplikasi data krs online," Jurnal Algoritma, vol. 20, no. 1, 2023.

Satyarca, "Implementasi back up dan replikasi data yang efisien dengan metode synchronous," Jurnal Teknik Informatika, vol. 5, no. 2, 2019.

F. Apriliansyah, "Implementasi load balancing pada web server menggunakan nginx," Jurnal Informatika, vol. 7, no. 1, 2020.

Gusti, dkk., "Performance analysis high availability web server cluster gke," Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 5, no. 10, 2021.

PostgreSQL Global Development Group, "Chapter 27. High Availability, Load Balancing, and Replication," PostgreSQL 15 Documentation, 2023. [Online]. Available: https://www.postgresql.org/docs/15/high-availability.html

Zalando SE, "Patroni: A Template for PostgreSQL HA with ZooKeeper, etcd, or Consul," GitHub Repository, 2023. [Online]. Available: https://github.com/zalando/patroni

Etcd Core Team, "etcd: A distributed, reliable key-value store for the most critical data of a distributed system," Raft Consensus Implementation, 2023. [Online]. Available: https://etcd.io/docs/

Downloads

Published

2026-06-20

How to Cite

[1]
I. P. S. Putra, I. N. G. A. Astawa, and L. G. P. Suardani, “Performance Trade-offs of Synchronous and Asynchronous Replication in Patroni-based PostgreSQL Clusters”, J. teknol. inf. pendidik., vol. 19, no. 2, pp. 1628–1636, Jun. 2026.