Analisis Perbandingan Performa Koneksi Database Postgresql 17 Dengan Arsitektur Direct Connection Dan Connection Pooling Pgbouncer

Authors

  • Muhammad Fahrur Rozi UPN Veteran Jawa Timur
  • Faisal Muttaqin UPN Veteran Jawa Timur

DOI:

https://doi.org/10.59945/jpnm.v4i3.1377

Keywords:

Connection Pooling, Kinerja Basis Data, PgBouncer, PostgreSQL 17, Transaction Pooling

Abstract

Transformasi digital mendorong kebutuhan infrastruktur basis data yang stabil, efisien, dan mampu melayani transaksi konkuren dalam jumlah besar. PostgreSQL menggunakan model proses per koneksi sehingga peningkatan jumlah klien dapat menambah beban memori, CPU, dan waktu inisialisasi. Penelitian ini bertujuan membandingkan performa arsitektur direct connection melalui HAProxy dengan arsitektur connection pooling menggunakan PgBouncer pada PostgreSQL 17. Penelitian menggunakan pendekatan kuantitatif eksperimental berbasis benchmarking PGBench dalam lingkungan Docker Compose. Pengujian dilakukan pada tiga skenario beban, yaitu 10, 50, dan 100 klien simultan dengan empat thread selama 60 detik. Parameter yang dianalisis meliputi latency, throughput dalam satuan Transactions Per Second (TPS), waktu inisialisasi koneksi, dan jumlah proses koneksi aktif. Hasil menunjukkan bahwa direct connection lebih responsif pada beban ringan hingga menengah. Namun, pada 100 klien, PgBouncer dengan mode transaction pooling menghasilkan TPS lebih tinggi, yaitu 263,65 dibandingkan 231,47, memperpendek waktu inisialisasi koneksi, serta menurunkan proses aktif dari 105 menjadi 26. Temuan ini menunjukkan bahwa connection pooling lebih sesuai untuk sistem dengan lonjakan koneksi tinggi.

References

Amazon Web Services. (2024). PostgreSQL benchmark observations and considerations. AWS Documentation. https://docs.aws.amazon.com/whitepapers/latest/optimizing-postgresql-on-ec2-using-ebs/postgresql-benchmark-observations-and-considerations.html

Docker Inc. (2026). What is Docker? Docker Docs. https://docs.docker.com/get-started/docker-overview/

Eng, K., Hindle, A., & Stroulia, E. (2024). Patterns of multi-container composition for service orchestration with Docker Compose. Empirical Software Engineering. https://doi.org/10.1007/s10664-024-10462-8

Gregg, B. (2020). Systems performance: Enterprise and the cloud (2nd ed.). Addison-Wesley Professional.

HAProxy Technologies. (2026). HAProxy configuration manual. https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/

Mattermost. (2022). Optimizing database connection loads with PgBouncer and Testwick. https://mattermost.com/blog/optimizing-database-connection-loads-with-pgbouncer-and-testwick/

Microsoft. (2026). PgBouncer in Azure Database for PostgreSQL. Microsoft Learn. https://learn.microsoft.com/en-us/azure/postgresql/connectivity/concepts-pgbouncer

PgBouncer Team. (2026). PgBouncer command-line usage. https://www.pgbouncer.org/usage.html

Piedade, B., Dias, J. P., & Correia, F. F. (2022). Visual notations in container orchestrations: An empirical study with Docker Compose. arXiv. https://doi.org/10.48550/arXiv.2207.09167

PostgreSQL Global Development Group. (2024). PostgreSQL 17 documentation: Connections and authentication. https://www.postgresql.org/docs/17/runtime-config-connection.html

Rawls, C., & Amini Salehi, M. (2022). Load balancer tuning: Comparative analysis of HAProxy load balancing methods. arXiv. https://doi.org/10.48550/arXiv.2212.14198

Silberschatz, A., Korth, H. F., & Sudarshan, S. (2019). Database system concepts (7th ed.). McGraw-Hill Education.

Stack Overflow. (2020). Improve database performance with connection pooling. https://stackoverflow.blog/2020/10/14/improve-database-performance-with-connection-pooling/

Waseem, M., Ahmad, A., Liang, P., Akbar, M. A., Khan, A. A., Ahmad, I., Setälä, M., & Mikkonen, T. (2024). Containerization in multi-cloud environment: Roles, strategies, challenges, and solutions for effective implementation. arXiv. https://doi.org/10.48550/arXiv.2403.12980

Downloads

Published

2026-07-01

How to Cite

Muhammad Fahrur Rozi, & Faisal Muttaqin. (2026). Analisis Perbandingan Performa Koneksi Database Postgresql 17 Dengan Arsitektur Direct Connection Dan Connection Pooling Pgbouncer. JPNM Jurnal Pustaka Nusantara Multidisiplin, 4(3). https://doi.org/10.59945/jpnm.v4i3.1377