Is it possible to configure LVS (keepalived) loadbalancer with direct server return (DSR) for 2 leg network setup?
The desired architecture is as follows: mariadb galera cluster, where each node has 4 NICs. The networks attached are C, B, R and M. There are also 2 loadbalancer nodes with 3 NICs attached to C, B and M networks. All are RHEL7 systems. The networks M and R are not important for the discussion, they will be used for management and data replication respectively.
What I would like to achieve is to have requests coming from the network C to virtual IP on the active loadbalancer and go to the DB cluster through the network B. Then a DB node would respond directly to the calling client on network C.
Network diagram (for simplicity one client, LB and server):
----------
| Client |
----------
| *.3.50
|
v
net C ======================================
^ LB VIP=*.3.1 ^
| |
| *.3.20 | *.3.200
---------- ---------------
| LB | | Real server |
---------- ---------------
| *.4.10 | *.4.200
| |
v v
net B ======================================
When I set real server IPs from network C in keepalived configuration it seems working, but it stops when I change them to network B IPs.