Forum OpenACS Q&A: Re: Using Pound for loadbalancing on three Public IPs

I am sure that you can do it as listed above, however, is there a reason that you have not set up BGP and are advertising your own block of IP addresses?

This would let you have instant failover of ALL TCP/IP sessions of any kind.

Collapse
Posted by Vinod VB on
Thanks very much Patrick. I think setting up BGP requires permission from ISPs with added responsibilities. Thats why we go for other options. I have some doubts about the above configuration like if a client creates a https section to a internet website eg. 34.36.45.43, the actual section end points will be 63.34.54.67 and 34.36.45.43.

Client - 192.168.0.55
Pound listening IP - 192.168.0.40
Webserver in Internet - 34.36.45.43

Suppose Pound maps that connection through GW 63.34.54.67, the one selected from available three GWs.

192.168.0.55--->192.168.0.40--->63.34.54.67-->........--->34.36.45.43

Now, 3rd and last are public IPs of our's and webserver respectively. As per my knowledge, this time the HTTPS, SSH etc use these public IPs as endpoints. If the GW goes down, the Pound will route the traffic through next available GW changing 3rd IP.
eg.

192.168.0.55--->192.168.0.40--->56.34.67.23-->........--->34.36.45.43

Now, the connection endpoints are 56.34.67.23 and 34.36.45.43.

So, Will the connection be reset if the any of the endpoint IPs change? If yes, we can not keep existing connections intact if one gw goes down, but at the same time new connections will be routed through next available gw. These are my thoughts!! please advise.

Collapse
Posted by Gustaf Neumann on
Will the connection be reset if the any of the endpoint IPs change?

pound makes for every incoming connection (HTTP over TCP or SSL) and outgoing TCP connection to the backend. In your case, a connection to the external proxy server at the GW. This is a point-to-point connections, where a couple of parameters can be configured (e.g. timeout). If pound is in the middle of a TCP transfer from/to the GW, and the GW goes down, it will hang until the timeout. Pound does not try continue the TCP connection on a different GW (which is more or less impossible due to unknown state of un-flushed buffers, etc). Only retransmits of the failed request will go to a different GW.

You ask "So, Will the connection be reset if the any of the endpoint IPs change? If yes, we can not keep existing connections intact if one gw goes down, but at the same time new connections will be routed through next available gw. "

The only way to have this work correctly, 100% of the time, is to use BGP. You may wish to ask your ISPs (one or more of them) if they will set up BGP for you.

With BGP you would "announce" your IP address block and the various ways to reach your servers via the 3 different ISP connections. You would have 1 set of IP addresses that all 3 network connections would "know" how to reach.

Traffic would automatically switch to using whichever is closest from a network standpoint while all 3 connections were up. If one or two connections went down, traffic would still reach your server via the connection that was still working.

If you are paying more than 1000 USD or Euros per month in connection charges, then you are paying enough to merit setting up BGP, and your ISP should be able to help you for free or at a low cost. If instead you are having different connections but are using low-cost, low-speed links like DSL, then the ISP will probably not assist you.