0

I have a standard master-slave replication for MariaDB to sync one database (master) to multiple slaves. One of the slaves lives behind a proxy, so I need to proxy the replication request to the proxy and from the proxy to the master.

Can I use the proxy_protocol_networks parameter to proxy the requests? Can I proxy replications requests?

Example:

  • master: 192.168.1.1
  • slave: 172.16.1.20
    mysqld.cnf: proxy_protocol_networks= "172.16.1.1"
  • proxy: 172.16.1.1

slave ---> proxy ----> master

1 Answer 1

1

Yes, you can proxy replication requests if the proxy is configured to speak the proxy protocol to the master.

4
  • Is this also possible with a proxy of defined ports? The proxy only allow traffic on port 80/443 and my master listens on port 3306. So the traffic goes like this. 172.16.1.20 --> 172.16.1.1:443 --> 192.168.1.1:3306
    – userk23r
    Commented Jan 18, 2022 at 9:57
  • How to configure the proxy parameter for the slave?
    – userk23r
    Commented Mar 4, 2022 at 9:43
  • The slave doesn't need any configuration apart from connecting to the proxy server.
    – danblack
    Commented Mar 4, 2022 at 9:45
  • Please edit your question to include your proxy information including configuration. Reference to proxy protocol. MariaDB replicas (slaves) cannot speak to HTTP proxies which you may be assuming.
    – danblack
    Commented Mar 9, 2022 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.