This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Internal Load Balancing

So I have 2 MariaDB servers setup in a master master replication status.  I went into the load balancing section and added a LB rule for them.  From all indications everything looks correct.  The server shows both DB servers up and running.

I set it up like this

Service MySQL
Virtual an additional IP that I tied to the internal interface
My 2 DB Servers

The load balancing works great for my external facing services but this isn't the first problem I've had with internal loadbalancing.  I setup one for NTP with the same deal.  It works great for the external side of things but internally I cannot get it to work.  

Thank you all in advance for your help with this.


This thread was automatically locked due to age.
  • Ahhhhh, not Load Balancing at all!

    Your NAT rule is ineffective because you can't DNAT traffic to a network or group.  If you have that setup and you are trying to use a Load Balancing rule, the DNAT captures the traffic first and, essentially, sends it to bit Heaven.  (See #2 in Rulz.)

    You will want to disable/delete that NAT rule, add/enable the SNAT I recommended earlier in this thread (please let us know if it works without enabling that rule) and add/enable a rule in 'Network Protection >> Load Balancing'.

    Does it work as you want, now?

    Cheers - Bob
  • Ok so with the SNAT (my apologies on the mix up there) this is now working. I have the SNAT turned on and the LB turned on and it works.  If I turn the SNAT off then it doesn't work.
    Thank you very much for your help with this.  I just figured that the server load balancing section would just work.  Now I know to do SNAT in the future.
  • Thanks for confirming that it works the way I expected.

    Your first two problems were with the DNAT - not only was it broken, it also prevented the Load Balancer from seeing the traffic.  The last problem was that the servers were sending responses directly back to the requestors, and they were dropping the traffic because it wasn't coming from the IP to which they had sent the requests.

    Cheers - Bob