Suppose I call:

TSHttpSsnHookAdd(ssn, TS_HTTP_READ_REQUEST_HDR_HOOK, contp);

and the session is a server-side session.  Does the hook fire for all the
transactions that use that server-side session?

Does the global TS_HTTP_SSN_START_HOOK fire for server-side as well as
client-side sessions?  If so, I think we'd need a new, boolean-valued TS
API function like TSIsServerSideSsn(TSHttpSsn) so the hook handling code
will know whether the session it's passed as event data is client or server
side.

On Wed, Aug 7, 2019 at 10:22 AM Aaron Canary <acan...@verizonmedia.com>
wrote:

> I don't believe there is any docs other than
> https://github.com/apache/trafficserver/issues/5488, which is based on
> https://cwiki.apache.org/confluence/display/TS/Presentations+-+2018?preview=/75958509/80453132/Cork_%20%20Http2%20to%20origin.pdf
>
> To answer your question directly, I expect the API will be updated to only
> use ProxySession, which will contain an enum & accessor to determine if it
> is a server or client. And yes all TS_API calls will assert or handle the
> remote types.
>
> On Tue, Aug 6, 2019 at 5:37 PM Walt Karas <wka...@verizonmedia.com.invalid>
> wrote:
>
>> Are there notes somewhere that outline our plans for supporting
>> server-side
>> sessions in the TS API?  Are we eventually going to have distinct handles
>> for client-side and server-side sessions (maybe TSHttpCsSsn
>> andTSHttpSsSsn,
>> with TSHttpSsn a deprecated synonym for TSHttpCsSsn) ?  Will start/stop
>> hooks fire for server-side sessions, and will there be distinct hoods for
>> client and server side sessions?
>>
>> Currently on master it looks like TSHttpSsn instances can map to a
>> ProxySession pointer or a Http1ServerSession pointer in core ATS.  It
>> seems
>> like the plugin is supposed to keep track of whether the handle is for a
>> client or server side session.  In some places we check that the plugin is
>> keeping track properly:
>>
>>
>> https://github.com/apache/trafficserver/blob/master/src/traffic_server/InkAPI.cc#L7493
>>
>> but generally we don't:
>>
>>
>> https://github.com/apache/trafficserver/blob/master/src/traffic_server/InkAPI.cc#L4774
>>
>

Reply via email to