If you use MaxScale to route queries from various servers to some
MariaDB server(s), when viewing the processlist on the MariaDB
server, you will see MaxScale’s host for any “host” information
related to that connection or its queries.
When tracking down problematic queries, it can be helpful to know
what originating host of that query.
MaxScale’s proxy protocol to the rescue.
The proxy protocol was introduced in MaxScale 2.2 and MariaDB
10.3.
To enable it, it is quite simple (essentially just 2 changes).
1. In MariaDB, you need to set the variable
proxy_protocol_networks in your my.cnf file (you can specify
comma-separated IP addresses and/or subnetworks, as well as
localhost and ::1):
proxy-protocol-networks=::1, 192.168.0.0/16, localhost
This one, which I will use as-is, is the example from the
…
[Read more]