# Ssl session id and spdy/http2 traffic

**URL:** <https://www.ruby-forum.com/t/ssl-session-id-and-spdy-http2-traffic/244778>\
**Category:** NGINX\
**Created:** [June 13, 2016, 9:01am UTC](https://www.ruby-forum.com/t/ssl-session-id-and-spdy-http2-traffic/244778 "2016-06-13T09:01:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [June 13, 2016, 9:01am UTC](https://www.ruby-forum.com/t/ssl-session-id-and-spdy-http2-traffic/244778/1 "2016-06-13T09:01:03Z")

</div>

I have noticed that the variables ssl\_session\_id and ssl\_session\_reused  
are  
always empty for http2 traffic (and for spdy before that). Under http  
1.1  
they are set as expected and documented.  
What’s the reason for this? Why not list the ID of the single connection  
that is used for the multiplexing?  
A big reason why I am logging both variables is to make sure that ssl  
connections are being reused for http2 and to be able to check if the  
ssl  
cache  
overruns. If the those two variables are not available, what do you  
suggest  
to use instead?

Thanks!

Posted at Nginx Forum:

> **[ssl session id and spdy/http2 traffic](https://forum.nginx.org/read.php?2,267548,267548#msg-267548)**
>
> I have noticed that the variables ssl\_session\_id and ssl\_session\_reused are always empty for http2 traffic (and for spdy before that). Under http 1.1 they are set as expected and documented. What's the reason for this? Why not list the ID of the...

---

<div class="post-metadata">

**Author:** ![gitl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@gitl](https://www.ruby-forum.com/u/gitl)\
**Post date:** [June 14, 2016, 4:29pm UTC](https://www.ruby-forum.com/t/ssl-session-id-and-spdy-http2-traffic/244778/2 "2016-06-14T16:29:06Z")

</div>

Hello!

On Mon, Jun 13, 2016 at 03:00:16AM -0400, gitl wrote:

> I have noticed that the variables ssl\_session\_id and ssl\_session\_reused are  
> always empty for http2 traffic (and for spdy before that). Under http 1.1  
> they are set as expected and documented.  
> What’s the reason for this? Why not list the ID of the single connection  
> that is used for the multiplexing?  
> A big reason why I am logging both variables is to make sure that ssl  
> connections are being reused for http2 and to be able to check if the ssl  
> cache  
> overruns. If the those two variables are not available, what do you suggest  
> to use instead?

The $ssl\_session\_id and $ssl\_session\_reused variables are  
available with HTTP/2 much like with normal HTTP. There are  
couple of nuances though:

- $ssl\_session\_id is not available when using session tickets, at  
least till a session is actually reused, see detailed  
explanation at [#927 (Set $ssl\_session\_reused to "t" for session ticket reuse and set $ssl\_session\_id with session tickets) – nginx](http://trac.nginx.org/nginx/ticket/927#comment:1);

- in HTTP/2 connections are usually kept open for a long time, and you  
aren’t likely to see actual SSL session reuse due to this - in most  
cases you will see just another request in an already opened  
connection.

–  
Maxim D.

> **[nginx](http://nginx.org/)**
