How To Use HAProxy with a Tungsten Connector Farm

Published Date Author: , Posted June 5th, 2025 at 1:32:51pm

Using the Tungsten Connector with HAProxy

Tungsten Connector can be combined with an HAProxy installation to provide a high-availability entry point, which in turn routes intelligently to the underlying datasources inside the cluster.

There are three ways to monitor MySQL health in HAProxy—two are recommended and one is not (mysql-check, which floods Connector logs with failures):

  • check (native TCP check)
    ✅ RECOMMENDED
    Add check to every server line so HAProxy opens a TCP handshake on a schedule. Success marks the node “up”; failure marks it “down”. Without it, HAProxy assumes the node is always reachable.
  • External check script (via xinetd)
    ✅ RECOMMENDED
    Runs custom SQL for deep health and consistency checks.
  • mysql-check (native MySQL handshake)
    ❌ NOT RECOMMENDED
    Sends a handshake and optional auth packet but cannot verify schema consistency and spams the logs.

See the example HAProxy configuration file below for a full haproxy.cfg file.

Additional detail is in the official HAProxy docs.

The two recommended methods are illustrated below:

Configuring HAProxy Using the Basic Native Check

✅ RECOMMENDED  — no MySQL user required.

Configuring HAProxy Using an External Check Script

✅ RECOMMENDED

Install the script on every Connector host; HAProxy polls each one on port 9200.

Step 1 — Create the MySQL health-check user

Step 2 — Add credentials to /opt/continuent/tungsten/tungsten-connector/conf/user.map

Step 3 — Deploy /opt/continuent/share/connectorchk.sh

Step 4 — Install xinetd

Step 5 — Register the service

Step 6 — Create /etc/xinetd.d/connectorchk as the root user

Step 7 — Restart and verify

Example haproxy.cfg

Monitoring HAProxy Status

Ensure stats socket is enabled in haproxy.cfg:

(Restart HAProxy after editing haproxy.cfg.)

Check runtime stats with nc:

You need nc installed, and the command must run with root privileges to access
the UNIX socket.

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.