Perbandingan Load Balancing Router Mysql Dan HAProxy Menggunakan SysBench dan Cluster Innodb Pada Sistem Operasi Centos
Comparison Of Load Balancing Mysql Router And HAProxy Using SysBench In Innodb Cluster On Centos OS
DOI:
https://doi.org/10.14421/csecurity.2025.8.1.5004Abstract
Load balancing merupakan penyeimbang server dalam mendistribusikan beban kerja ke beberapa server dengan mempertimbangkan kapasitas masing-masing server. Ketika beberapa server digunakan, layanan yang ada dapat tetap berfungsi meskipun salah satu server mengalami kegagalan. Dua model load balancing yang akan digunakan adalah MySQL Router dan HAProxy. Penelitian ini bertujuan untuk membandingkan kinerja MySQL Router dan HAProxy dari segi waktu respons, throughput, dan distribusi beban server. Selain itu, penelitian ini juga menguji sinkronisasi data antar server database dengan menggunakan Sysbench sebagai alat pengujian. Sysbench merupakan utilitas benchmark yang dapat mengevaluasi kinerja sistem melalui berbagai parameter pengujian. Hasil penelitian menunjukkan bahwa MySQL Router memiliki kemampuan load balancing yang signifikan dalam mendistribusikan beban dan memastikan ketersediaan server dibandingkan dengan HAProxy. Pengujian dengan thread (beban) terkecil hingga terbesar pada load balancer MySQL Router menghasilkan rentang TPS (Transaction Per Second) 2900 hingga 2600; seiring bertambahnya thread (beban), TPS yang diperoleh semakin menurun, dengan rentang waktu respons 2 hingga 50 ms. Namun, HAProxy menunjukkan nilai TPS yang lebih kecil, berkisar antara sekitar 900 hingga 800 TPS, tetapi menghasilkan waktu respons yang relatif lama, berkisar antara 8 hingga 160 ms. Pengujian sinkronisasi database menunjukkan efisiensi kedua model dalam menangani perubahan data pada server yang berbeda. Penelitian ini memberikan kontribusi yang signifikan terhadap pengembangan infrastruktur TI yang lebih andal dan efisien dalam organisasi, khususnya dalam konteks penggunaan MySQL InnoDB Cluster dan HAProxy pada OS CentOS.
Kata kunci: Load Balancing, MySQL Router, HaProxy, InnoDB Cluster, Centos Os, Networking
----------------------------
Abstract
Load balancing is a server balancer that distributes the workload among several servers, taking into account the capacity of each server. When multiple servers are used, existing services can continue to function even if one server fails. The two load balancing models to be used are MySQL Router and HAProxy. This study aims to compare the performance of MySQL Router and HAProxy in terms of response time, throughput, and server load distribution. Additionally, this study also tests data synchronization between database servers using Sysbench as a testing tool. Sysbench is a benchmark utility that can evaluate system performance through various test parameters. The results of the study show that MySQL Router has significant load balancing capabilities in distributing loads and ensuring server availability compared to HAProxy. Testing with the smallest to the largest threads on the MySQL Router load balancer resulted in a TPS range from 2900 to 2600; as the thread (load) increases, the TPS obtained decreases, with a response time range of 2 to 50 ms. However, HAProxy showed a smaller TPS value, ranging from around 900 to 800 TPS, but resulted in a relatively long response time, ranging from 8 to 160 ms. Database synchronization tests also reveal the efficiency of both models in handling data changes on different servers. This research makes a significant contribution to the development of more reliable and efficient IT infrastructure within organizations, particularly in the context of using MySQL InnoDB Cluster and HAProxy on CentOS OS.
Keywords: Load Balancing, MySQL Router, HaProxy, InnoDB Cluster, Centos Os, Networking.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Arini Arini, andrew fiade, Ridwan Baharsyah

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.