Forum Discussion
hc_andy_35682
Mar 22, 2010Nimbostratus
OneConnect and Proxy/Squid Load Balancing
Hi All,
We provide proxy services (http/https) to a large number of schools (each with their own static IP). Each school can have 1000's of connections to the virtual server at any time.
What we have is a a large squid (proxy) cluster and in front of that is the F5 doing least conns with source address persistence. Each pool member also has a 4000 max conns limit. What we're finding is that several of our squid servers are reaching their max conn limit.
1/ When the max conn limit is reached, will the client (school) request be served by another available pool member taking into consideration that we have source address pesistence enabled so the client (school) is expecting to hit the same pool member all the time? If the client (school) is served by another pool member, wouldn't this then break the source address persistence?
2/ Would something like a OneConnect profile help us reduce the number of connections from the LTM to the squid cluster. I've read up on it but not 100% sure how it applies in a squid/proxy environment.
Is this like having one big pipe (tcp connection) from the LTM to the squid box say for school 1's incoming connections, so that all new connections from school 1 uses that big pipe. What about the return traffic from the squid box back to the school? Is it still returning traffic via this big pipe or does it need to create a new tcp connection for the return traffic?
Thanks.
Andy
- mikand_61525NimbostratusNote to self: When using "SSL Proxy" in your webbrowser it means that the request is sent in cleartext to the forward https-proxy.
- nitassEmployeewithout private key, i do not think we can use either asm or avr with https proxy since you know we are not able to see clear text traffic.
- mikand_61525NimbostratusI can use a private key because I do ssl-termination further out in the chain, but will that work since the http profile doesnt seem to allow CONNECT as method?
- nitassEmployeei am trying to setup in lab but i am a bit confused about your setting. would you mind posting the VS_FORWARD-HTTPS virtual and its pool configuration here?
- mikand_61525NimbostratusSure, I hope the attached code is enough to reproduce this?
ltm default-node-monitor { rule /Common/ICMP_PROXY } ltm node /Common/PROXY1 { address 10.1.1.254 } ltm pool /Common/POOL_PROXY_HTTP { load-balancing-mode fastest-node members { /Common/PROXY1:3128 { address 10.1.1.254 } } monitor /Common/inband and /Common/TCP_PROXY service-down-action reset } ltm pool /Common/POOL_PROXY_HTTPS { load-balancing-mode fastest-node members { /Common/PROXY1:3129 { address 10.1.1.254 } } monitor /Common/inband and /Common/TCP_PROXY service-down-action reset } ltm virtual /Common/VS_PROXY_HTTP { destination /Common/10.2.1.1:3128 http-class { /Common/HTTPCLASS_PROXY } ip-protocol tcp mask 255.255.255.255 persist { /Common/SOURCE_ADDR_PROXY { default yes } } pool /Common/POOL_PROXY_HTTP profiles { /Common/ANALYTICS_PROXY { } /Common/HTTP_PROXY { } /Common/ONECONNECT_PROXY { } /Common/TCP-LAN-OPTIMIZED_PROXY { } } vlans-disabled } ltm virtual /Common/VS_PROXY_HTTPS { destination /Common/10.2.1.1:3129 ip-protocol tcp mask 255.255.255.255 persist { /Common/SOURCE_ADDR_PROXY { default yes } } pool /Common/POOL_PROXY_HTTPS profiles { /Common/ONECONNECT_PROXY { } /Common/TCP-LAN-OPTIMIZED_PROXY { } } vlans-disabled } ltm virtual-address /Common/10.2.1.1 { address 10.2.1.1 mask 255.255.255.255 traffic-group /Common/traffic-group-1 } ltm monitor icmp /Common/ICMP_PROXY { defaults-from /Common/icmp destination * interval 15 time-until-up 0 timeout 46 } ltm monitor tcp /Common/TCP_PROXY { defaults-from /Common/tcp destination *:* interval 15 time-until-up 0 timeout 46 } ltm persistence source-addr /Common/SOURCE_ADDR_PROXY { app-service none defaults-from /Common/source_addr timeout 3600 } ltm profile analytics /Common/ANALYTICS_PROXY { captured-traffic-external-logging disabled captured-traffic-internal-logging enabled collect-geo enabled collect-http-throughput enabled collect-ip enabled collect-methods enabled collect-page-load-time enabled collect-response-codes enabled collect-server-latency enabled collect-url enabled collect-user-agent enabled collect-user-sessions enabled collected-stats-external-logging disabled collected-stats-internal-logging enabled defaults-from /Common/analytics description none notification-by-email disabled notification-by-snmp disabled notification-by-syslog disabled remote-server-ip any6 remote-server-port 514 remote-server-syslog-facility local0 session-timeout 300 session-timeout-minutes 5 traffic-capture { capturing-for-ANALYTICS_PROXY { captured-protocols all } } trust-xff enabled } ltm profile http /Common/HTTP_PROXY { app-service none defaults-from /Common/http security enabled } ltm profile httpclass /Common/HTTPCLASS_PROXY { app-service none asm enabled defaults-from /Common/httpclass } ltm profile one-connect /Common/ONECONNECT_PROXY { app-service none defaults-from /Common/oneconnect max-age 3600 source-mask 255.255.255.255 } ltm profile tcp /Common/TCP-LAN-OPTIMIZED_PROXY { app-service none defaults-from /Common/tcp-lan-optimized proxy-buffer-high 280000 proxy-buffer-low 277000 }
- nitassEmployee
what proxy are you using? is it squid? may i also have squid configuration?
- nitassEmployeei am not much familiar with squid. wondering if there is any special when configuring https proxy i.e. port 3129. is it just another instance like port 3128?
[root@ve1023:Active] config b virtual bar1 list virtual bar1 { snat automap pool foo1 destination 172.28.19.79:3128 ip protocol 6 profiles { http {} tcp {} } } [root@ve1023:Active] config b pool foo1 list pool foo1 { members 172.28.19.251:3128 {} } [root@ve1023:Active] config b virtual bar2 list virtual bar2 { snat automap pool foo2 destination 172.28.19.79:3129 ip protocol 6 profiles { http {} tcp {} } } [root@ve1023:Active] config b pool foo2 list pool foo2 { members 172.28.19.251:3129 {} } curl -Ik https://www.google.com/ -x 172.28.19.79:3129 HTTP/1.0 200 Connection established HTTP/1.1 200 OK Date: Sun, 15 Jan 2012 04:40:45 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Set-Cookie: PREF=ID=7d5331ea4cb18cc1:FF=0:TM=1326602445:LM=1326602445:S=XqerRof5YDSF_HmF; expires=Tue, 14-Jan-2014 04:40:45 GMT; path=/; domain=.google.com Set-Cookie: NID=55=RAt7S2S7r0ObTTPxyMjBDgD32anR8fjyt-4_syPbnTIVIZNXsDp05oB0IvLlm-7Crd7Djrmw5ZJdWyKV5ADooEWHwEj6yzJGDADudQfx8i5mU6PvRa7JVEzdSFjzR2Cs; expires=Mon, 16-Jul-2012 04:40:45 GMT; path=/; domain=.google.com; HttpOnly P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info." Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked [root@ve1023:Active] config ssldump -Aed -nni 0.0 port 3129 New TCP connection 1: 172.28.19.253(35339) <-> 172.28.19.79(3129) 1326602789.8656 (0.0030) C>S --------------------------------------------------------------- CONNECT www.google.com:443 HTTP/1.0 Host: www.google.com:443 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8r zlib/1.2.3 libidn/0.6.5 Proxy-Connection: Keep-Alive --------------------------------------------------------------- New TCP connection 2: 172.28.19.80(35339) <-> 172.28.19.251(3129) 1326602789.8667 (0.0010) C>S --------------------------------------------------------------- CONNECT www.google.com:443 HTTP/1.0 Host: www.google.com:443 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8r zlib/1.2.3 libidn/0.6.5 Proxy-Connection: Keep-Alive ---------------------------------------------------------------
- mikand_61525NimbostratusNo its not squid and which portnumber one use doesnt really matter. You can use 1234 in your tests if you like.
- Spidey_29396NimbostratusHi nitass,
- Mahmoud_ElSouryNimbostratusHi Spidey, Was the problem resolved, I have the same problem now.
- Spidey_29396NimbostratusHi Mahmoud ElSoury, Unfortunate client didn't push thru with the project. Thanks! Ferdz
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects