HTTP2.0與tomcat

文藝小青年發表於2017-06-01

    tomcat 支援http2.0嗎?

 

  首先,HTTP2.0協議一級公佈,只是推廣和各個中介軟體軟體的適配需要時間。

stackoverflow裡“Tomcat support for HTTP/2.0?”,jetty的原始碼碼作者做了如下的總結:

  I`m the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2.Tomcat`s Mark Thomas has outlined support for HTTP/2 for Tomcat 9.

  Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN support in the JDK (which also I am involved in), and that ALPN support in the JDK is scheduled for JDK 9, it is probably going to be a long time before all that materializes.However, be aware that other Servlet Containers already provide HTTP/2 support.

  Jetty 9.3.0 has full, robust, support for HTTP/2, client and server. We have been running HTTP/2 on our own website for many months now, and we consider HTTP/2 support production ready.

  Jetty`s HTTP/2 Push APIs are being considered for inclusion in Servlet 4.0. HTTP/2 Push is already available to applications deployed to Jetty in a transparent way (via a Servlet Filter).

  Undertow also has an implementation for HTTP/2.

  Netty also has one, but it`s not based on the Servlet APIs.

  可以看到,其實很多的中介軟體廠商都已經準備和JDK(主要是servlet標準)繫結釋出了。

  開源中國上有一則tomcat9的釋出公告

 Apache Tomcat 9.0.0.M1 是 9.0.x 的第一個里程碑版本,提供 9.0.x 的新特性早期預覽,希望能得到使用者的反饋。

值得關注的改進:

–   新增 HTTP/2 支援和 TLS 虛擬主機

–   實現當前 Servlet 4.0 規範草案

–   BIO connectors 不再支援 Windows Itanium 和 Comet

  comet取消,因為http2.0 加入了 server push的功能。  

  

    SPDY vs HTTP2.0

 

  http 2.0 也參考自google的SPDY。雖然SPDY並未成為標準,但是作為一種相容http協議,並且是高效能和安全的的http訪問方案,也曾在國內的廠商中使用:

  作為下一代http協議,HTTPS、SPDY和HTTP/2的效能比較

  在SPDY和HTTP/2中都用到的多路複用技術,可以參考這個demo。可以這麼考慮,就是http基於文字的傳輸方式太慢,我們希望能夠採用tcp傳輸層中一些經驗,來優化,當然第一步就是把http打包成二進位制。

  HTTP2.0那些事這篇文章,極為詳細地從SPDY分析到HTTP2.0的誕生。

  

  HTTP vs HTTPS

   基於安全的原因,很多公司都把網站換成了https,但是https是需要ca機構簽發證照的,否則像chrome這些瀏覽器會進行安全提示的。

  但是網站換成了https之後,會不會影響百度的收錄呢?

  參考這篇站點切換https不會對流量產生負面影響。答案是基本不會,如果原來是http,做了對映到 https,狀態碼是 301或302就沒有問題。

   本文轉自二郎三郎部落格園部落格,原文連結:http://www.cnblogs.com/haore147/p/5508287.html,如需轉載請自行聯絡原作者


相關文章