[squid-users] ICAP load balancing / failover / hot standby

From: Goran Slavic <gslavic_at_gmail.com>
Date: Fri, 2 Aug 2013 11:00:49 +0200

Hi everybody,
I am using:
- squid 3.3.8
- c-icap 0.2.5
-
My squid (icap related) configuration is as follows:

icap_enable on
icap_206_enable on
icap_preview_enable on
icap_preview_size 1024
icap_service_failure_limit 100 in 5 seconds icap_send_client_ip on
icap_send_client_username on icap_client_username_encode off
icap_client_username_header X-Authenticated-User

icap_service web_acc_01 respmod_precache icap://192.168.1.65:1344/echo
bypass=1 routing=0 ipv6=off on-overload=bypass max-conn=100 icap_service
web_acc_02 respmod_precache icap://192.168.1.47:1344/echo bypass=1 routing=0
ipv6=off on-overload=bypass max-conn=10000

adaptation_service_set web_acc_set web_acc_01 web_acc_02

adaptation_access web_acc_set allow all

I have couple of questions (problems)

1. THIS configuration works fine in situations where either .65 or .47 is
not functioning ([down])- after 30sec or a valid OPTIONS call icap Service
goes [up] and is in use again . BUT the same thing DOES NOT happen when the
.65 server reaches his 100 max-conn limit. Squid does not go to .47 for
adaptation. Squid does not try to call .47 later. On top of that if the
"on-overload" is set to "block" client receives error page instead of
modification from the .47 server. Did I make a configuration mistake or is
something else wrong ?
2. Is there a way to do load balancing od 2+ server or to use the existing 2
servers with more efficiency ?

3. Is there a way to define a "double service" and do a load balancing with
these phantom services as in this example

icap_service web_acc_01 respmod_precache icap://192.168.1.65:1344/echo
bypass=1 routing=0 ipv6=off on-overload=bypass max-conn=100 icap_service
web_acc_02 respmod_precache icap://192.168.1.47:1344/echo bypass=1 routing=0
ipv6=off on-overload=bypass max-conn=100 icap_service web_acc_03
respmod_precache icap://192.168.1.65:1344/echo bypass=1 routing=0 ipv6=off
on-overload=bypass max-conn=1000 icap_service web_acc_04 respmod_precache
icap://192.168.1.47:1344/echo bypass=1 routing=0 ipv6=off on-overload=bypass
max-conn=1000 icap_service web_acc_05 respmod_precache
icap://192.168.1.65:1344/echo bypass=1 routing=0 ipv6=off on-overload=bypass
max-conn=10000 icap_service web_acc_06 respmod_precache
icap://192.168.1.47:1344/echo bypass=1 routing=0 ipv6=off on-overload=bypass
max-conn=10000

where the overflow of web_acc_01 will result in redirecting of requests at
web_acc_02 then back to web_acc_03 which is a same physical but as a
deferent virtual service with a different max-conn

Thanks in advance
G.Slavic
Received on Fri Aug 02 2013 - 09:00:50 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 02 2013 - 12:00:19 MDT