Firefox 新版本用tls1.2访问web变慢原因分析

问题场景:

从firefox 72升级到firefox94,  发现访问自签名的网关设备web页面突然变慢。

问题分析:

通过whireshark抓了报文,按照tls handshake type过滤了一下,firefox 72的报文如下:

 其中除了第1,2两个client hello ,web server 是按照构造新session 流程返回serverhello ,certificate,等消息外,其余的client hello ,返回的都是重用session id 的serverhello消息。消息体明细小很多,看时间也少很多。

抓了firefox 95的报文:

从图中可以看到没有session id 复用的server hello应答,即每次http请求双方都需要协商新的session id , 时延明显长很多。

通过firefox95访问baidu.com,抓包情况如下:

 第二行server hello ,baidu.com返回支持session ticks 方式复用。

推测结论:firefox 94等高版本不再支持session id 方式复用,只支持session tickets方式复用。如果web server不支持tickets方式的话,firefox 与web server 之间通信时候将每次需要重新协商session id. 

猜你喜欢

转载自blog.csdn.net/tanghan511/article/details/121910875