On 06/21/2013 12:18 AM, anita wrote:
> I am trying to do some book keeping for every http request received to the
> parent from a child squid.
> I was using the Peer IP address: port combination as a key to store the http
> request.
> However, noticed that many requests can pass through the same ip:port
> combination if given successively.
> So this does not remain unique anymore.
>
> Any idea if there is some unique data about every http request received by
> the parent that I can use?
I would use something like a %sn-%ts.%03tu logformat definition. It will
not solve all the problems. As others have noted, Squid does not
currently support assigning globally unique identifiers to transactions,
and %sn is buggy IMO (because it resets too often), but the combination
of %sn and time should work for most purposes.
If this is really critical, you can generate and log a true [globally]
unique identifier using a helper annotation.
Finally, if you want to correlate requests recorded in parent and child
logs, you will need to pass the child-assigned transaction ID to parent
using an extension HTTP header. You can strip that header when the
request leaves your hierarchy. See request_header_add and friends.
HTH,
Alex.
Received on Fri Jun 21 2013 - 15:36:37 MDT
This archive was generated by hypermail 2.2.0 : Sat Jun 22 2013 - 12:00:08 MDT