3
votes

I have a clustered MySQL system as a backend and one server configured with HAProxy; so I can access the database using my HAProxy server IP address.

This is working correctly, but now I want to test the load balancing.

I want to compare the load balancing for one database backend, up to three database backends.

I have to use Apache Jmeter to test the capability of the HAProxy load balancer.

How to do it? I've tried using HTTP POST but it results in the same error request rate for any number of database backends.

1
"it results in the same error request rate" What does "the same error request rate" mean? Have you reviewed the logs of the application to discover what, specifically, is failing?Michael - sqlbot

1 Answers

0
votes
  1. I suppose that you have HAProxy properly configured So you can see in HAProxy stats something like this:

    enter image description here

    Do not use http mode in HAProxy config, use tcp mode instead.

  2. Download JDBC driver for MySQL
  3. Install JDBC driver = copy *.jar file to Jmeters ./lib folder
  4. Configure JDBC Connection Configuration in your Test Plan like this

    enter image description here

    Don't forget to use your own credentials, etc.

  5. Use JDBC Request to get data from DB enter image description here
  6. You can find example test plan here