AccelerUpDocs
Monitor/Database pool (ProxySQL)

Database pool (ProxySQL)

Routing, backend health, connection pooling and failover.

Monitor → Database Pool watches ProxySQL: which backends are taking traffic, how the pool is behaving, and what happens on failover.

Why it gets its own page

ProxySQL is where "the database is slow" is usually decided. A query can be fast, the backend healthy, and the application still waiting — because connections are queued at the pool.

What is tracked

HostgroupsWhich backends are in which group, and their state
ConnectionsUsed, free, and queued
Query routingWhich rules are matching
ErrorsPer backend
LatencyPer backend
Failover eventsWhen a backend moved between hostgroups

Queued connections

The number to watch. Free connections at zero with a queue forming means the application is blocked on the pool rather than on the database, and adding database capacity will not help.

Failover

Backend state transitions are recorded with a timestamp, so "when did we fail over" has an answer that does not depend on somebody remembering.

This deployment's failover design is documented in the infrastructure notes; the two constraints worth repeating here:

  • No semi-synchronous replication. The replica is 90 ms away; semi-sync would put that on every write.
  • max_replication_lag = 0 on the disaster-recovery backend, so it never takes application reads.

Control operations

With the right credentials, AccelerUp can perform ProxySQL control operations — moving a backend between hostgroups, for example.

Caution

These change live traffic routing. They are role-gated and audited, and the confirmation names the backend and the hostgroup it is moving to. Read it.

Alerting

Rules on queued connections, backend state, error rate per backend, and replication lag as ProxySQL sees it.

Note

ProxySQL's view of replication lag and the node's own view can differ. When they do, that difference is itself the signal — usually a monitor user that cannot see what it needs to.

Where this behaviour lives: backend/internal/integration/proxysql.go, backend/internal/worker/proxysql_alert_worker.go. If the code and this page disagree, the code is right — please fix the page.

Part of MonitorEverything that watches something and reports what it saw.