Balancing internal services using a Cisco CSS 11501
Posted
by Ladadadada
on Server Fault
See other posts from Server Fault
or by Ladadadada
Published on 2010-06-15T09:28:44Z
Indexed on
2010/06/15
9:32 UTC
Read the original article
Hit count: 379
First, the background to the problem: I have a Cisco CSS11501 that I am using to load balance a few web servers. These web servers have two network interfaces, one internal and one external and we are sending the requests to the internal interface.
We have the CSS configured to do NAT because our webservers need to see the client's IP address.
Because the TCP packets hit the webservers with a source address on the Internet, the webserver tries to send the packet back to the client over the external interface and not through the load balancer. In order to stop these requests being sent back out to the Internet via the external interface, we added a routing rule on these boxes so that all traffic with a source address on the internet will use the load balancer as the gateway. This part works fine.
What I would also like to to is use the CSS as a load balancer for internal services such as our MySQL slaves.
When I do this, I run into a similar problem; the TCP connection goes from the web server to the load balancer and then from the load balancer to the MySQL slave but the CSS spoofs a source address of the original webserver. The MySQL slave then tries to send the response directly to the webserver via the internal network and not via the load balancer.
The ideal solution would be to tell the CSS not to do source address spoofing on the internal network and only do it for requests originating on the Internet. Is this possible ?
Failing that, is there a way of directing the load balanced traffic back through the load balancer while keeping the other traffic (say SSH) purely on the internal network ?
Is there another way of using the CSS11501 to load balance internal services ?
© Server Fault or respective owner