Replies: 2 comments
-
Hi, in your case, We can confirm that from your
Besides this, I think it is not enough and there might be more suggestions as well:
[1] 3.2. Load Balancer Using Direct Routing: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/load_balancer_administration/s1-lvs-direct-vsa#doc-wrapper |
Beta Was this translation helpful? Give feedback.
-
@moaali Do you still need assistance with this, or have you resolved your problems? As a starting point I would look at the Linux Virtual Server web site, e.g. http://linuxvirtualserver.org/VS-DRouting.html for direct routing. When you use Direct Routing, IPVS forwards the incoming packets without modifying the IP layer, so a TCP packet destination port 80 received from 1.2.3.4 to 115.101.1.17 will be forwarded to the chosen real server using the same IP addresses. It uses the configured IP address of the real server in order to set the destination MAC address for the forwarded packet. This means two things:
The final issue that occurs to me is the return path for packets back to the internet. The example shown on the Linux Virtual Server web page referred to above shows return packets not going back via the keepalived server, whereas it is not clear what the return path is in your configuration. One potential issue to check, if the return path is via the keepalived server, is whether it is happy forwarding packets that it receives with the source address of the packet matching one of its own IP addresses (i.e. 115.101.1.17). |
Beta Was this translation helpful? Give feedback.
-
Trying to achieve L4 load balancing via Keepalived in front of HAProxy that will act as L7 load balancer. Both Keepalived and HAProxy are on separate machines. I managed to get everything in the below image working but when I try to send a request to the public virtual IP (i.e. 115.101.1.17), the connection always times out.
As per my understanding from the documentation that states:
I tried to reset the source IP using SNAT on the HAProxy machine but still the same thing happens.
Rules used for iptables on real servers (HAProxy machines)
keepalived.conf
sysctl.conf
Any help will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions