[squid-users] ICAP Persistent Connections vs Retries (with code review)
Eliezer Croitoru
eliezer at ngtech.co.il
Sun May 14 19:07:44 UTC 2017
Hey Juan,
Without delving into ICAP and HTTP semantics you should notice\remember one thing:
Proxies which are performing as an ICAP client should not care about a scenario which a single TCP connection is being used for a single query.
If indeed you find that this scenario, which many connections are being opened and closed towards the ICAP service, affects your service I believe you should rethink things over.
The directions you should think are:
- Software(OS or Squid or ICAP service)
- Hardware (CPU, RAM)
- Network (Network interfaces, Cables Switches)
I can testify that for HTTP content filtering and adaptation there are much more efficient pieces of software out there(which includes internal content adaptation).
With the above in mind you should not really care too much about new TCP connections per request.
If you see some performance degradation in your environment I would recommend your to create a "check list" which will help you to decide what direction you should choose.
All The Bests,
Eliezer
* Let me know if you need some help with the check list or software which you can test.
----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il
From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Juan Ram?rez
Sent: Friday, May 12, 2017 3:50 AM
To: squid-users at lists.squid-cache.org
Subject: [squid-users] ICAP Persistent Connections vs Retries (with code review)
Hi,
Mi name is Juan, I am a Software Engineer from Uruguay. I think this message is more suited to the squid-dev mailing list due to the developer-oriented nature of the message but, given that the development list is for people who actually contributes code to Squid, I chose to post here.
I started using Squid a few days ago in order to test its content-adaptation capabilities. The plan was to test the ICAP implementation first and then maybe try the eCAP API as well.
In order to test ICAP, I based my code in the open source PYICAP project, I also ran some tests using the C-ICAP server.
It came to my attention that, even when persistent connections is enabled, Squid closes the ICAP connection everytime a new request arrives, like this:
1. A new request arrives
2. Squid creates a connection to the ICAP server
3. Content is adapted and returned to the client
4. Squid returns the connection to the connection pool
5. A new requests arrives
6. Squid closes the active connection
7. Squid opens a new connection to the ICAP server
Note: I am using only the RESPMOD method.
<<SNIP>>
--
Juan
:wq
More information about the squid-users
mailing list