trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 毅程 <phillipchen...@gmail.com>
Subject Re: about event hooks for https messages
Date Wed, 04 Mar 2015 01:06:21 GMT
Thanks James.
You are right, the state diagram for http and https seems to be the same.
this problem is more obvious in https scenario is because for https the
connections are usually not closed (kept alive), in ATS hook words, the
TS_EVENT_HTTP_TXN_CLOSE hook is seldom invoked. (for http it is almost
always invoked per request)
and in https senario even the TS_EVENT_HTTP_READ_REQUEST_HDR is not invoked
for every request.

let's say I open https://www.yahoo.com 3 times. the data flowed to client
is 300K (assuming 100K per response.), but in https cases, the
TS_EVENT_HTTP_READ_REQUEST_HDR is only invoked once, and the
TS_EVENT_HTTP_TXN_CLOSE is also once. but the
TSHttpTxnClientRespBodyBytesGet is reported 300K.
I want to be able to get 3 100K reporting even for https scenario. (which
hook will report me 3 100K)

Cheng Yi

2015-03-03 16:42 GMT-08:00 James Peach <jpeach@apache.org>:

>
> > On Mar 3, 2015, at 4:09 PM, 毅程 <phillipchengyi@gmail.com> wrote:
> >
> > Thanks Sudheer.
> > I need a more inline/realtime way instead of passive log way.
> > The problem i am facing now is
> > for http there is no problem
> > for https i can't find the right hook to get the request and response
> size even though the client already get the response. (since there is keep
> alive http connections for https), I can only get the size when the
> transaction is closed which will be very late.
>
> Transaction hooks are no different between http and https. Maybe there's a
> problem in how you are selecting transactions to attach the hooks? Or if
> this is a remap plugin, are you applying the plugin to the right remap
> rules?
>
> >
> > Cheng Yi
> >
> > 2015-03-03 15:48 GMT-08:00 Sudheer Vinukonda <sudheerv@yahoo-inc.com>:
> > Typically, this information is available from the custom logging fields:
> >
> >
> https://docs.trafficserver.apache.org/en/latest/admin/event-logging-formats.en.html
> >
> > cqbl
> > The client request transfer length; the body length in the client
> request to Traffic Server (in bytes).
> > cqhl
> > The client request header length; the header length in the client
> request to Traffic Server.
> > csscl
> > The cached response length (in bytes) from origin server to Traffic
> Server.
> > csshl
> > The cached header length in the origin server response to Traffic Server
> (in bytes).
> >
> >
> > pscl
> > The length of the Traffic Server response to the client (in bytes).
> > pshl
> > The header length in Traffic Server’s response to the client.
> > psql
> > The proxy response transfer length in Squid format (includes header and
> content length).
> >
> > sscl
> > The response length (in bytes) from origin server to Traffic Server.
> > sshl
> > The header length (in bytes) in the origin server response to Traffic
> Server.
> >
> >
> > Thanks,
> >
> > Sudheer
> > From: 毅程 <phillipchengyi@gmail.com>
> > To: users@trafficserver.apache.org
> > Sent: Tuesday, March 3, 2015 3:00 PM
> > Subject: about event hooks for https messages
> >
> > Hi:
> >
> > I would like to measure the length of each request/response.
> > I can do it for http messages by adding hook at
> > TS_EVENT_HTTP_SEND_RESPONSE_HDR
> > TS_EVENT_HTTP_TXN_CLOSE
> >
> > but for https, it seems not working.
> >
> > Please help.
> >
> > Cheng Yi
> >
> >
> >
> >
>
>

Mime
View raw message