[ https://issues.apache.org/jira/browse/TS-3578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14540472#comment-14540472 ]
Susan Hinrichs commented on TS-3578: ------------------------------------ This rearrangement has worked well. For SSN_CLOSE, the hook gets triggered for both the HttpClientSession and the SpdyClientSession or Http2ClientSession. We only log for the Spdy/Http2 Client session since that is the only session with access to the netvc. For SSN_START, the hook is only called on the HttpClientSession, so no logging is performed in the Http2/Spdy case since the HttpClientSession does not have access to the netvc. This brings up a broader issue of when should the session start and session close hooks be called in the Http2/Spdy case. * Only on the Http2/Spdy client sessions * On both the Http2/Spdy and HttpClientSessions. In the case of the HttpClientSession, this would be with the same frequency as the TXN_START and TXN_CLOSE hooks. * Only on the HttpClientSession. In this case we would need to figure out how to get access to the netvc from the PluginVC. Plus the SSN hooks would not correspond to the real start and end of the user agent network connection. At this point, I prefer the option of calling the SSN hooks only on the Http2/Spdy client sessions. But I need feedback. Do people rely on SSN hooks having access to transaction data? Of course in the case of a native HTTP/1.x connection, nothing should change. The SSN and TXN hooks will be invoked against the HttpClientSession. > Rearrange Client Session processing to give access to socket at SSN_CLOSE for > all protocols > ------------------------------------------------------------------------------------------- > > Key: TS-3578 > URL: https://issues.apache.org/jira/browse/TS-3578 > Project: Traffic Server > Issue Type: Improvement > Components: HTTP, HTTP/2, SPDY > Reporter: Susan Hinrichs > Assignee: Susan Hinrichs > Labels: review > Fix For: 6.0.0 > > > I wanted to use the tcpinfo plugin to look at the kernel measured RTT. > Unfortunately, there was really only visibility for HTTP/1.x. Not HTTP/2 or > SPDY. In the H2 and SPDY cases, the underlying NetVC is a PluginVC and does > not have access to the underlying socket. > With HTTP/2, the SSN_CLOSE hook would trigger, but by the time the SSN_CLOSE > hook would go off, the netVC had already been closed. > I propose making the following changes. > 1. Make SpdyClientSession a subclass of ProxyClientSession, so > SSN_CLOSE_HOOK can be triggered there too. > 2. Rearrange the hook calling and net vc close so the SSN_CLOSE hook is > called before the net vc is closed. > I've made both changes on my dev build, and in my simple tests, the tcpinfo > plugin is recording times for traffic on top of HTTP/1.1, SPDY, and HTTP/2. > Since this involves rearranging some of the bowels of the protocol > processing, I'll set up a pull request for broader review. -- This message was sent by Atlassian JIRA (v6.3.4#6332)