Squid Load Balancing
I am not sure if I can do this but here goes...
My setup is this. Me and a mate have our own networks and internet connections, but have our networks linked by wifi. The wifi cards are in linux routers, which also route onto the internet, and each run squid. However, as these are domestic internet connections, we cannot bond the connections, to provide faster connections. My solution to this is: get squid to distribute the load between the connections. What I would like is:
Any ideas? I could do something similar using redirectors, but this would rewrite URL's so I don't know if it would cache correctly (under original URL), and also resuming may be a problem. I also want to make sure that some sites this doesnt happen with (ones which check IP's and link login to that, and any that mess up with this configuration) |
if i was wanting to use this scenario as you've described it i'd probably be looking at a proxy configuration file to laod balance directly from the client. http://naragw.sharp.co.jp/sps/ using a logic like this from the client, the proxies do ont need to care that the other exists, as all clients would always go to the same proxy for a certain kind of url. in my own experience though you have an issue with things like login sessions if you are spreading a site such as this one between two proxies which have different public ip addresses, as half the time (ish) your requests come from a different address to the one you logged in on, so may end up logging in multiple times and worse. as such i'd *probably* suggest encoding by domain name, not full url, so requests to lq.org always go to a single proxy...
additionally maybe you'd rather just look at chapter4 of lartc.org? from this logic, you'd always want to query the peer cache if you wish to keep two, but each squid box is (presuambly) able to use either uplink on a more effective load balance. |
All times are GMT -5. The time now is 06:46 PM. |