{"id":149183,"date":"2019-07-06T10:19:53","date_gmt":"2019-07-06T02:19:53","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=149183"},"modified":"2019-06-25T15:21:07","modified_gmt":"2019-06-25T07:21:07","slug":"http-3","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/http-3.html","title":{"rendered":"\u89e3\u8bfbHTTP\/3"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u672f\u7684\u53d1\u5c55\u603b\u662f\u8ba9\u4eba\u76ee\u4e0d\u6687\u63a5\uff0c2018\u5e7410\u6708\uff0cHTTP\/3\u53c8\u53d1\u5e03\u4e86\u3002\u867d\u7136\u5df2\u7ecf\u6709\u4e00\u4e9b\u4e2d\u6587\u6280\u672f\u5a92\u4f53\u505a\u4e86\u62a5\u9053\uff0c\u4f46\u5927\u591a\u6570\u662f\u7ffb\u8bd1\u7684\uff0c\u800c\u4e14\u5185\u5bb9\u5927\u540c\u5c0f\u5f02\u3002\u6700\u8fd1\u6211\u4e13\u95e8\u5b66\u4e60\u4e86\u70b9\u5173\u4e8eHTTP\/3\u7684\u77e5\u8bc6\uff0c\u5728\u8fd9\u91cc\u968f\u4fbf\u5199\u5199\uff0c\u548c\u5927\u5bb6\u505a\u4e2a\u5206\u4eab\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u5148\u7b80\u5355\u56de\u987e\u4e00\u4e0bHTTP\/2\u5427\u3002\u81ea\u4ece1999\u5e74HTTP 1.1\u53d1\u5e03\u4e4b\u540e\uff0cWeb\u4e00\u76f4\u5728\u8fc5\u731b\u53d1\u5c55\uff0c\u53ef\u60dcHTTP\u534f\u8bae\u4e00\u76f4\u6ca1\u6709\u66f4\u65b0\u3002\u7b49\u4e0d\u53ca\u7684Google\u81ea\u5df1\u641e\u4e86\u4e2aSPDY(\u8bfb\u97f3\u662f\u201cspeedy\u201d)\uff0c\u5e76\u4f9d\u9760Chrome\u6d4f\u89c8\u5668\u5927\u8086\u63a8\u5e7f\u3002\u770b\u5230SPDY\u7684\u6548\u679c\u786e\u5b9e\u5f88\u597d(\u53ef\u4ee5\u5e26\u6765\u8fd150%\u7684\u6027\u80fd\u63d0\u5347)\uff0cIETF\u63a8\u52a8\u5236\u5b9a\u4e86HTTP\/2\u3002 SPDY\u548cHTTP\/2\u7684\u4e3b\u8981\u7279\u6027\u5c55\u793a\u5982\u4e0b\uff1a \u5728\u4f20\u7edfHTTP\u4e2d\uff0c\u6982\u5ff5\u6a21\u578b\u975e\u5e38\u7b80\u5355\uff1a\u4e0b\u5c42TCP\u901a\u8baf\u4e0e\u4e0a\u5c42HTTP\u5b8c\u5168\u4e0d\u642d\u67b6\uff0c\u4f46TTP\u4e0eTCP\u7684\u201c\u8fde\u63a5\u201d\u662f\u91cd\u5408\u7684\uff0cTCP\u4f20\u8f93\u7684\u5355\u4f4d\u662fpacket\uff0cHTTP\u5219\u91c7\u7528request-response\u7684\u6a21\u578b\u3002<\/p>\n \u5728HTTP\/2\u4e2d\uff0c\u6982\u5ff5\u6a21\u578b\u6709\u6240\u53d8\u5316\uff0cHTTP\/2\u4e2d\u4f20\u8f93\u7684\u57fa\u672c\u5355\u4f4d\u662f\u5e27(frame)\u3002\u4e0eHTTP 1.1\u7684\u660e\u6587\u4f20\u8f93\u4e0d\u540c\u7684\u662f\uff0cHTTP\/2\u7684\u5e27\u662f\u4e8c\u8fdb\u5236\u7684\uff0c\u540c\u65f6TCP\u627f\u8f7d\u7684\u201c\u903b\u8f91\u8fde\u63a5\u201d\u53eb\u6570\u636e\u6d41(stream)\uff0c\u6240\u6709\u7684\u72b6\u6001\u6d41\u8f6c\u3001\u6d41\u63a7\u3001\u4f18\u5148\u7ea7\u7b49\u7b49\u7279\u6027\u90fd\u662f\u5728\u6570\u636e\u6d41\u4e0a\u5b9e\u73b0\u7684\u3002HTTP\/2\u4e2d\u4e3a\u5927\u5bb6\u6240\u6d25\u6d25\u4e50\u9053\u7684\u201c\u591a\u8def\u590d\u7528\u201d\uff0c\u7b80\u5355\u8bf4\u5c31\u662f\u628a\u6570\u636e\u6d41\u5206\u89e3\u4e3a\u591a\u4e2a\u5e27\uff0c\u591a\u4e2a\u6570\u636e\u6d41\u7684\u5e27\u6df7\u5408\u4e4b\u540e\u4ee5\u540c\u4e00\u4e2aTCP\u8fde\u63a5\u6765\u53d1\u9001\u3002<\/p>\n \u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0cHTTP\u67091.0\u548c1.1\u7684\u533a\u5206\uff0c\u6240\u4ee5\u5199\u4f5cHTTP 1.0\uff0cHTTP 1.1\uff0c\u4f46HTTP\/2\u4e0d\u4f1a\u6709\u5176\u5b83\u5c0f\u7248\u672c\uff0c\u6240\u4ee5\u4e0d\u8981\u5199\u4f5cHTTP 2.0\uff0c\u800c\u5e94\u5f53\u5199\u6210HTTP\/2\u3002<\/p>\n \u867d\u7136HTTP\/2\u5df2\u7ecf\u5e26\u6765\u4e86\u5de8\u5927\u7684\u6027\u80fd\u63d0\u5347\uff0c\u4f46\u5927\u5bb6\u5bf9\u6027\u80fd\u7684\u6e34\u6c42\u662f\u6ca1\u6709\u6b62\u5883\u7684\u3002\u5728\u5e94\u7528\u5c42\u7684\u8bb8\u591a\u95ee\u9898\u89e3\u51b3\u4e4b\u540e\uff0c\u4e0b\u4e00\u4e2a\u4f18\u5316\u7684\u91cd\u70b9\u5c31\u662f\u4f20\u8f93\u5c42\u4e86\u3002\u65e0\u8bbaSPDY\u8fd8\u662fHTTP\/2\uff0c\u4f20\u8f93\u5c42\u534f\u8bae\u90fd\u662fTCP\uff0cTCP\u6709\u4e00\u4e9b\u5a18\u80ce\u91cc\u5e26\u6765\u7684\u95ee\u9898\uff0c\u6bd4\u5982\u6162\u542f\u52a8\uff0c\u5982\u679c\u62e5\u585e\u7a97\u53e3\u5c3a\u5bf8\u8bbe\u7f6e\u4e0d\u5408\u7406\uff0cTCP\u7684\u6027\u80fd\u4f1a\u6025\u5267\u4e0b\u964d\u3002\u5173\u4e8e\u8fd9\u4e2a\u95ee\u9898\uff0c\u7f51\u7edc\u4e0a\u5df2\u7ecf\u6709\u8bb8\u591a\u8ba8\u8bba\uff0c\u8fd9\u91cc\u4e0d\u8d58\u8ff0\u3002<\/p>\n \u53e6\u4e00\u4e2a\u91cd\u8981\u95ee\u9898\u662f\uff0cHTTP\/2\u7684\u591a\u8def\u590d\u7528\u5e26\u6765\u7684\u6548\u679c\u5e76\u4e0d\u5982\u60f3\u8c61\u7684\u90a3\u4e48\u597d\u3002\u867d\u7136HTTP\/2\u4e2d\u7684\u4f20\u8f93\u8fde\u63a5\u53ef\u4ee5\u591a\u8def\u590d\u7528\uff0c\u4f46\u4ecd\u7136\u65e0\u6cd5\u907f\u514d\u961f\u5934\u963b\u585e\u7684\u60c5\u51b5\u51fa\u73b0\u3002\u56e0\u4e3aTCP\u662f\u9700\u8981\u4fdd\u8bc1\u6709\u5e8f\u7684\uff0c\u5047\u5982\u5355\u4e2aTCP\u8fde\u63a5\u540c\u65f6\u627f\u8f7d\u4e86\u56db\u8def\u903b\u8f91\u8fde\u63a5\uff0c\u5176\u4e2d\u67d0\u4e2a\u903b\u8f91\u8fde\u63a5\u4e22\u5305\u4e86\uff0c\u5219\u5176\u5b83\u4e09\u8def\u90fd\u4f1a\u53d7\u5f71\u54cd\uff0c\u90fd\u5fc5\u987b\u4ece\u4e22\u5305\u7684\u65f6\u523b\u5f00\u59cb\u91cd\u4f20\uff0c\u8fd9\u65e0\u7591\u662f\u6781\u5927\u7684\u6d6a\u8d39\u3002\u6d4b\u8bd5\u8868\u660e\uff0c\u5982\u679c\u4e22\u5305\u7387\u8d85\u8fc72%\uff0c\u90a3\u4e48HTTP\/2\u751a\u81f3\u4e0d\u5982HTTP 1.1\uff0c\u56e0\u4e3aHTTP 1.1\u4e2d\u5404\u8fde\u63a5\u7269\u7406\u9694\u79bb\uff0c\u4e0d\u4f1a\u4e92\u76f8\u5f71\u54cd\u3002 \u5927\u6982\u6709\u4eba\u542c\u8fc7QUIC(\u8bfb\u97f3quick)\uff0c\u77e5\u9053\u5b83\u662f\u57fa\u4e8eUDP\u7684HTTP\uff0c\u4e5f\u77e5\u9053\u5b83\u4f9d\u7136\u662fGoogle\u6700\u5148\u63d0\u51fa\u6765\u7684\u3002\u786e\u5b9e\uff0c\u4e0a\u6b21\u662fGoogle\u7387\u5148\u641e\u51fa\u4e86SPDY\uff0c\u8fd9\u6b21Google\u53c8\u7387\u5148\u641e\u51fa\u4e86QUIC\u3002\u6839\u636eGoogle\u672c\u610f\uff0cQUIC\u662f\u628a\u4f20\u7edf\u7684HTTP\/TCP\/IP\u534f\u8bae\u6808\u4e2d\u7684TCP\u6362\u6210UDP(\u5f53\u7136\u9700\u8981\u52a0\u5bc6)\uff0c\u80fd\u901a\u8fc7\u52a0\u5bc6\u7684UDP\u4f20\u8f93HTTP\/2\u7684\u5e27\u3002<\/p>\n \u6309\u7167Google\u7684\u8bf4\u6cd5\uff0c\u8fd9\u6837\u7684\u597d\u5904\u5f88\u591a\uff0c\u6bd4\u5982UDP\u5efa\u7acb\u8fde\u63a5\u7684\u5ef6\u8fdf\u4f1a\u4f4e\u5f88\u591a\uff0c\u800c\u4e14\u907f\u514d\u4e86\u961f\u5934\u963b\u585e\u3002\u9664\u6b64\u4e4b\u5916\uff0cGoogle\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e2a\u975e\u5e38\u8bf1\u4eba\u7684\u7279\u6027FEC(Forward Error Correction)\u3002\u7b80\u5355\u8bf4\uff0c\u5b83\u60f3\u505a\u5230\u7684\u662f\uff0c\u4e00\u65e6\u6709packet\u4e22\u5931\uff0c\u63a5\u6536\u65b9\u53ef\u4ee5\u6839\u636e\u4e4b\u524d\u548c\u4e4b\u540e\u7684packet\u63a8\u65ad\u51fa\u4e22\u5931packet\u7684\u6570\u636e\uff0c\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u91cd\u4f20\u3002\u4f46\u662f\u8fd9\u6837\u5fc5\u7136\u8981\u6c42\u589e\u52a0\u5197\u4f59\u8f7d\u8377\uff0c\u6216\u8005\u8bf4\uff0c\u8fd9\u5c31\u662f\u7f51\u7edc\u534f\u8bae\u4e2d\u7684RAID 5\u3002\u6309\u7167\u76ee\u524d\u770b\u5230\u7684\u8d44\u6599\uff0c\u5176\u5197\u4f59\u6bd4\u4f8b\u5927\u6982\u662f10%\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6bcf10\u4e2apakcet\u4e2d\u7684\u5197\u4f59\u4fe1\u606f\uff0c\u5c31\u53ef\u4ee5\u91cd\u6784\u4e00\u4e2apacket\u3002<\/p>\n \u5c3d\u7ba1Google\u7684QUIC\u5f88\u5148\u8fdb\uff0c\u4f46QUIC\u4e0d\u6b62\u8fd9\u4e00\u5bb6\uff0cIETF\u4e5f\u6709QUIC\uff0c\u5982\u4eca\u5df2\u7ecf\u6539\u540dHTTP\/3\uff0c\u6240\u4ee5Google\u7684QUIC\u6709\u65f6\u5019\u4e5f\u5199\u4f5cgQUIC\u3002\u4e0eGoogle\u5355\u7eaf\u5728\u4f20\u8f93\u5c42\u52a8\u624b\uff0c\u5e94\u7528\u5c42\u57fa\u672c\u6cbf\u7528HTTP\/2\u4e0d\u540c\uff0cIETF\u7684QUIC\u662f\u4e00\u4e2a\u6df7\u5408\u65b9\u6848\uff0c\u65e2\u5305\u62ec\u4f20\u8f93\u5c42\u7684\u6539\u52a8\uff0c\u4e5f\u5305\u62ecHTTP\u5c42\u7684\u6539\u52a8(\u6bd4\u5982\u5168\u65b0\u7684\u5934\u90e8\u538b\u7f29)\u3002\u4ece\u53e6\u4e00\u4e2a\u89d2\u5ea6\u6765\u8bf4\uff0c\u5b83\u66f4\u201c\u5b8c\u6574\u201d\u3002\u867d\u7136\u7406\u8bba\u4e0aQUIC\u4e5f\u53ef\u4ee5\u652f\u6301HTTP\u4e4b\u5916\u7684\u5176\u5b83\u4e0a\u5c42\u5e94\u7528\uff0c\u4f46\u76ee\u524d\u8fd9\u53ea\u662f\u8ba1\u5212\u800c\u5df2\uff0c\u7b2c\u4e00\u7248QUIC\u5e76\u4e0d\u5305\u542b\u8fd9\u65b9\u9762\u5185\u5bb9\u3002<\/p>\n \u57282018\u5e7411\u6708\uff0cIETF\u6b63\u5f0f\u5ba3\u5e03\uff0cHTTP-over-QUIC\u66f4\u540d\u4e3aHTTP\/3\u3002 \u867d\u7136TCP\u6709\u5404\u79cd\u95ee\u9898\uff0c\u4f46\u6362\u6210UDP\u7684\u8bdd\uff0cTCP\u7684\u4e0d\u5c11\u529f\u80fd\u4e5f\u9700\u8981\u539f\u6837\u79fb\u690d\u8fc7\u6765\u3002\u8bb8\u591a\u4eba\u90fd\u77e5\u9053\uff0cTCP\u662f\u53ef\u9760\u7684\u4f20\u8f93\u534f\u8bae\uff0c\u800cUDP\u662f\u4e0d\u53ef\u9760\u7684\u3002HTTP\/3\u5f53\u7136\u4e0d\u80fd\u4e0d\u53ef\u9760\uff0c\u6240\u4ee5\u5b83\u5fc5\u987b\u81ea\u5df1\u5b9e\u73b0\u6709\u5e8f\u6027\u3001\u9519\u8bef\u4fa6\u6d4b\u3001\u91cd\u4f20\u3001\u62e5\u585e\u63a7\u5236\u3001\u4f20\u8f93\u8282\u594f\u8c03\u6574\u7b49\u7b49\u7279\u6027\u3002<\/p>\n HTTP\/2\u201c\u4f3c\u4e4e\u201d\u5fc5\u987b\u7528\u5230HTTPS\uff0c\u4f46\u89c4\u8303\u5e76\u4e0d\u5f3a\u6c42HTTP\/2\u4f7f\u7528HTTPS\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u4f60\u7528HTTP\u6765\u8dd1HTTP\/2\uff0c\u7406\u8bba\u4e0a\u4e5f\u662f\u53ef\u4ee5\u6210\u7acb\u7684\uff0c\u867d\u7136\u8fd9\u6709\u70b9\u602a\u5f02\u3002<\/p>\n \u4e0e\u6b64\u76f8\u53cd\uff0cQUIC\u7684\u6240\u6709\u8fde\u63a5\u90fd\u662f\u52a0\u5bc6\u7684\uff0c\u76ee\u524d\u91c7\u7528\u7684\u662fTLS 1.3\u3002\u5982\u679c\u4f60\u4ed4\u7ec6\u89c2\u5bdf\u4e0a\u9762\u7684\u56fe\u5c31\u4f1a\u53d1\u73b0\uff0cTLS 1.3\u662f\u201c\u56ca\u62ec\u201d\u5728QUIC\u5f53\u4e2d\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0cQUIC\u5efa\u7acb\u8fde\u63a5\u7684\u63e1\u624b\u8fc7\u7a0b\u5f53\u4e2d\u5c31\u540c\u65f6\u5b8c\u6210\u4e86\u52a0\u5bc6\u63e1\u624b\u3002HTTP\/3\u7684\u63e1\u624b\u5f88\u5feb\uff0c\u5982\u679c\u4e24\u53f0\u4e3b\u673a\u4e4b\u95f4\u5efa\u7acb\u8fc7\u8fde\u63a5\uff0c\u5e76\u4e14\u7f13\u5b58\u4e86\u4e4b\u524d\u7684secret\uff0c\u53ea\u8981\u5ba2\u6237\u7aef\u9a8c\u8bc1\u4e4b\u524d\u7f13\u5b58\u7684server config\u5c31\u53ef\u4ee5\u76f4\u63a5\u5efa\u7acb\u8fde\u63a5\uff0c\u76f8\u5f53\u4e8e0-RTT\uff0c\u5426\u5219\u4e5f\u53ea\u9700\u89811-RTT\u5c31\u53ef\u4ee5\u5efa\u7acb\u8fde\u63a5\u3002\u6b64\u5916\uff0cQUIC\u8fd8\u5bb9\u8bb8\u57280-RTT\u7684\u60c5\u51b5\u4e0b\u4ece\u4e00\u5f00\u59cb\u5c31\u634e\u5e26\u6570\u636e\uff0c\u4f20\u7edf\u7684\u201c\u5efa\u7acb\u8fde\u63a5-\u52a0\u5bc6\u63e1\u624b-\u53d1\u9001\u6570\u636e\u201d\u5982\u4eca\u53ef\u4ee5\u4e09\u6b65\u5e76\u4f5c\u4e00\u6b65(\u8fd9\u4e2a0-RTT\u548c1-RTT\u7684\u5b9e\u73b0\u90fd\u975e\u5e38\u6709\u610f\u601d\uff0c\u6709\u5174\u8da3\u7684\u8bdd\u5e94\u5f53\u627e\u8d44\u6599\u6765\u770b\u770b)\u3002<\/p>\n QUIC\u4e2d\u867d\u7136\u4e5f\u6709\u8fde\u63a5(Connection)\uff0c\u4e5f\u57fa\u4e8eIP\u548cport\u5efa\u7acb\uff0c\u4f46\u5b83\u5e76\u4e0d\u80fd\u76f4\u63a5\u4e0eTCP\u7684\u8fde\u63a5\u5bf9\u5e94\uff0c\u4e5f\u4e0d\u540c\u4e8eHTTP\/2\u4e2d\u7684\u8fde\u63a5\u3002\u539f\u56e0\u5728\u4e8eQUIC\u5efa\u7acb\u8fde\u63a5\u65f6\u65e2\u5b8c\u6210\u4e86\u7ecf\u5178\u7684\u4f20\u8f93\u63e1\u624b\uff0c\u53c8\u5b8c\u6210\u4e86\u52a0\u5bc6\u63e1\u624b\u2014\u2014\u4f60\u53ef\u4ee5\u8ba4\u4e3a\u8fd9\u6837\u5206\u5c42\u8d23\u4efb\u4e0d\u6e05\u6670\uff0c\u4f46\u5b83\u786e\u5b9e\u63d0\u5347\u4e86\u6548\u7387\u3002QUIC\u7684\u8fde\u63a5\u4e0eHTTP\/2\u7c7b\u4f3c\uff0c\u4e00\u4e2a\u7269\u7406\u8fde\u63a5\u4e5f\u53ef\u4ee5\u627f\u8f7d\u591a\u4e2a\u903b\u8f91\u8fde\u63a5(\u4e5f\u5c31\u662f\u6570\u636e\u6d41)\u3002\u4f46\u4e0eHTTP\/2\u4e0d\u540c\u7684\u662f\uff0cQUIC\u4e2d\u7684\u903b\u8f91\u8fde\u63a5\u662f\u5f7c\u6b64\u72ec\u7acb\u7684\uff0c\u6240\u4ee5\u907f\u514d\u4e86TCP\u4e0a\u51fa\u73b0\u7684\u201c\u903b\u8f91\u8fde\u63a5\u7532\u4e22\u5305\u5bfc\u81f4\u903b\u8f91\u8fde\u63a5\u4e59\u3001\u4e19\u3001\u4e01\u90fd\u9700\u8981\u91cd\u4f20\u201d\u7684\u60c5\u51b5\u3002<\/p>\n QUIC\u8fde\u63a5\u7684\u53e6\u4e00\u4e2a\u7279\u70b9\u662f\uff0c\u6bcf\u4e2a\u8fde\u63a5\u90fd\u6709\u4e00\u7ec4\u8fde\u63a5ID\u3002\u8fde\u63a5\u5404\u7aef\u53ef\u4ee5\u8bbe\u5b9a\u81ea\u5df1\u7684\u8fde\u63a5ID\uff0c\u540c\u65f6\u8ba4\u53ef\u5bf9\u65b9\u7684\u8fde\u63a5ID\u3002\u8fde\u63a5ID\u7684\u4f5c\u7528\u5728\u4e8e\u4ece\u903b\u8f91\u4e0a\u6807\u8bc6\u5f53\u524d\u8fde\u63a5\u3002\u6240\u4ee5\uff0c\u5982\u679c\u7528\u6237\u7684IP\u53d1\u751f\u53d8\u5316\u800c\u8fde\u63a5ID\u6ca1\u6709\u53d8\u5316\uff0c\u56e0\u4e3apacket\u5305\u542b\u4e86\u7f51\u7edcID\u6807\u8bc6\u7b26\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u7ee7\u7eed\u53d1\u9001\u6570\u636e\u5305\u5c31\u53ef\u4ee5\u91cd\u65b0\u5efa\u7acb\u8fde\u63a5\u3002\u800c\u76ee\u524d\uff0c\u5982\u679c\u7528\u6237\u7684\u8bbe\u5907\u53d1\u751f\u4e86\u7f51\u7edc\u5207\u6362\uff0c\u6bd4\u5982\u4eceWi-Fi\u5207\u6362\u52304G\uff0c\u5219\u6240\u6709\u8fde\u63a5\u90fd\u8981\u65ad\u6389\u518d\u91cd\u8fde\u3002<\/p>\n \u5982\u679c\u4f60\u8be6\u7ec6\u7814\u7a76\u8fc7HTTP\/2\uff0c\u5e94\u5f53\u77e5\u9053\u5b83\u7684header\u538b\u7f29\u91c7\u7528\u7684HPACK\uff0c\u56e0\u4e3agzip\u505aheader\u538b\u7f29\u6709\u5b89\u5168\u6027\u9690\u60a3\u3002HTTP\/3\u540c\u6837\u63d0\u4f9b\u4e86header\u538b\u7f29\uff0c\u4f46\u4e0d\u80fd\u76f4\u63a5\u6cbf\u7528HPACK\u3002\u539f\u56e0\u5728\u4e8e\uff0cHPACK\u7c97\u7565\u6765\u8bf4\u5c31\u662f\u4e00\u5f20\u52a8\u6001\u8868(dynamic table)\uff0c\u7531request-response\u5171\u540c\u7ef4\u62a4\u5b83\uff0c\u540e\u7eedheader\u4e2d\u4e0d\u4f1a\u5b8c\u6574\u91cd\u590d\u4e4b\u524d\u7684\u6761\u76ee\uff0c\u800c\u662f\u5f15\u7528\u4e4b\u524d\u7684\u6761\u76ee\uff0cTCP\u7684\u6709\u5e8f\u6027\u4fdd\u8bc1\u4e86\u5b83\u4e00\u5b9a\u662f\u5148\u4fee\u6539\u518d\u8bfb\u53d6\uff0c\u4e5f\u5c31\u662f\u5148\u7f16\u7801\u518d\u89e3\u7801\u3002<\/p>\n \u7136\u800c\u5982\u679c\u4f7f\u7528HPACK\uff0c\u591a\u4e2a\u6d41\u7684\u987a\u5e8f\u662f\u65e0\u6cd5\u4fdd\u8bc1\u7684\uff0c\u8fd9\u6837\u4f1a\u5bfc\u81f4\u89e3\u6790\u9519\u8bef\u3002QUIC\u7684\u89e3\u51b3\u65b9\u6848\u662fQPACK\uff0c\u5176\u539f\u7406\u5f88\u7b80\u5355\uff1a\u6240\u6709\u7684header\u5fc5\u987b\u901a\u8fc7\u540c\u4e00\u6570\u636e\u6d41\u6765\u4f20\u8f93\uff0c\u800c\u4e14\u5fc5\u987b\u4e25\u683c\u6709\u5e8f\u3002\u4f46\u662f\u8fd9\u6837\u4e00\u6765\uff0c\u4eceHTTP 1.1\u5f00\u59cb\u5c31\u56f0\u6270HTTP\u5df2\u4e45\u7684\u961f\u5934\u963b\u585e\u53c8\u51fa\u73b0\u4e86\u3002\u56e0\u6b64\uff0cQUIC\u7684\u957f\u671f\u76ee\u6807\u4e4b\u4e00\u5c31\u662f\u89e3\u51b3header\u7684\u961f\u5934\u963b\u585e\u95ee\u9898\u3002<\/p>\n \u505a\u8fc7\u5728\u7ebf\u5347\u7ea7\u7684\u670b\u53cb\u90fd\u77e5\u9053\uff0c\u5728\u7ebf\u5347\u7ea7\u4e2d\u7684\u4e00\u4e2a\u5fc5\u987b\u6210\u5206\u662f\u63d0\u4f9b\u964d\u7ea7\u65b9\u6848\uff0c\u4ee5\u4fdd\u8bc1\u201c\u9000\u5316\u201d\u517c\u5bb9\u3002\u65e0\u8bbaHTTP\/2\u8fd8\u662fHTTP\/3\uff0c\u90fd\u4e0d\u80fd\u9003\u907f\u8fd9\u90e8\u5206\u7684\u5de5\u4f5c\u91cf\u3002HTTP\/2\u867d\u7136\u53ef\u4ee5\u901a\u8fc7upgrade\u8fd9\u4e2aheader\u6765\u5347\u7ea7\uff0c\u4f46\u4e5f\u6709\u66f4\u7b80\u5355\u7684\u529e\u6cd5\uff0c\u5c31\u662f\u5728TLS\u63e1\u624b\u65f6\u534f\u5546HTTP\u7684\u7248\u672c\uff0c\u6bd4\u5982Nginx\u5c31\u6709NPN(Nginx Protocol Negotiation)\u6269\u5c55\uff0c\u81ea\u52a8\u534f\u5546\u534f\u8bae\uff0c\u5e76\u5df2\u7ecf\u88abIETF\u91c7\u7eb3\uff0c\u6210\u4e3aALPN(Application Layer Protocol Negotiation)\u3002<\/p>\n \u5982\u679cweb server\u6709\u8fd9\u6837\u7684\u7279\u6027\uff0c\u5e94\u7528\u670d\u52a1\u4ee3\u7801\u5c31\u4e0d\u5fc5\u4e3a\u517c\u5bb9HTTP 1.1\u548cHTTP\/2\u505a\u592a\u591a\u5de5\u4f5c\u3002\u4f46\u662f\uff0c\u5982\u679c\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u4e86Push\u7b49\u65b0\u7279\u6027\uff0c\u8fd8\u662f\u514d\u4e0d\u4e86\u8981\u505a\u5f88\u591a\u4e8b\u60c5\u3002\u5728\u4e1a\u754c\uff0cGoogle\u3001Youtube\u3001Wikipedia\u7b49\u5927\u5382\u65e9\u5df2\u7ecf\u63d0\u4f9b\u4e86\u5b8c\u6574\u670d\u52a1\uff0cHTTP\/2\u548cHTTP 1.1\u65e0\u7f1d\u5207\u6362\uff0c\u5ba2\u6237\u7aef\u5b8c\u5168\u65e0\u611f\u77e5\uff0c\u5b83\u4eec\u7684\u7ecf\u9a8c\u503c\u5f97\u53c2\u8003\u3002<\/p>\n \u4e0eHTTP\/2\u4e0d\u540c\u7684\u662f\uff0cHTTP\/3\u4e2d\u65b0\u5b9a\u4e49\u4e86\u4e00\u4e2aheader\uff0c\u53ef\u4ee5\u7528\u6765\u6307\u793a\u5ba2\u6237\u7aef\u201c\u5728\u53e6\u4e00\u4e2a\u7aef\u53e3\u63d0\u4f9b\u4e86\u4e13\u7528\u7684HTTP\/3\u670d\u52a1\u201d\u3002<\/p>\n Alt-Svc: h3=\":20003\"<\/p>\n \u8fd9\u4e2aheader\u8bf4\u660e\uff0c\u5728\u672c\u4e3b\u673a\u768420003\u7aef\u53e3\u5f00\u542f\u4e86HTTP\/3\u7684\u670d\u52a1\u3002\u6240\u4ee5\uff0c\u5ba2\u6237\u7aef\u4e4b\u540e\u53ef\u4ee5\u5c1d\u8bd5\u548c\u8fd9\u4e2a\u7aef\u53e3\u5efa\u7acb\u7eaf\u7cb9\u7684HTTP\/3\u8fde\u63a5\u3002<\/p>\n \u804a\u4e86\u8fd9\u4e48\u591aQUIC\u7684\u597d\u5904\u4e4b\u540e\uff0c\u518d\u8c08\u8c08\u5b83\u7684\u95ee\u9898\uff0c\u6709\u4e9b\u89c2\u70b9\u6765\u81ea\u6211\u4e2a\u4eba\uff0c\u672a\u5fc5\u8db3\u591f\u51c6\u786e\u5ba2\u89c2\uff0c\u6b22\u8fce\u8ba8\u8bba\u3002<\/p>\n \u867d\u7136QUIC\u6709\u8fd9\u4e48\u591a\u597d\u5904\uff0c\u4f46\u53ef\u4ee5\u770b\u5230\uff0c\u76f8\u6bd4HTTP\/2\uff0c\u5b83\u7684\u6539\u52a8\u76f8\u5f53\u5927\uff0c\u6240\u4ee5\u95ee\u9898\u4e5f\u4e0d\u4f1a\u5c11\u3002<\/p>\n \u7b2c\u4e00\u4e2a\u95ee\u9898\u662f\u4e0e\u9057\u7559\u7684\u7f51\u7edc\u8bbe\u5907\u7684\u517c\u5bb9\u95ee\u9898\u3002<\/strong><\/div>\n \u57fa\u4e8e\u76ee\u524d\u7684\u5e94\u7528\u60c5\u51b5\uff0c\u8bb8\u591a\u7f51\u7edc\u8bbe\u5907\u5bf9TCP\u548cUDP\u7684\u7b56\u7565\u76f8\u5f53\u56fa\u5b9a\uff0cTCP\u9650\u5236\u5728\u5e38\u7528\u7aef\u53e3\uff0c\u800cUDP\u5927\u6982\u53ea\u5f00\u653e\u4e8653\u7aef\u53e3(DNS)\u3002\u6240\u4ee5\u5982\u679cHTTP\/3\u4f7f\u7528UDP\uff0c\u517c\u5bb9\u6027\u65b9\u9762\u53ef\u80fd\u4f1a\u6709\u4e0d\u5c11\u95ee\u9898\u9700\u8981\u89e3\u51b3\u3002<\/p>\n \u4e0d\u8fc7\u5982\u679c\u8fd9\u4e2a\u95ee\u9898\u53ef\u4ee5\u89e3\u51b3\uff0c\u672a\u6765\u5927\u6982\u4e0d\u4f1a\u518d\u51fa\u73b0\u8fd9\u79cd\u95ee\u9898\uff0c\u56e0\u4e3aHTTP\/3\u7684\u8bbe\u8ba1\u601d\u60f3\u4e2d\u5df2\u7ecf\u4e3a\u672a\u6765\u505a\u4e86\u8003\u8651\uff0c\u5e94\u7528\u5c42\u548c\u4f20\u8f93\u5c42\u804c\u8d23\u4e25\u683c\u9694\u79bb\uff0c\u907f\u514d\u518d\u51fa\u73b0\u201c\u4f20\u8f93\u5c42\u4e00\u770b\u7aef\u53e3\u5c31\u77e5\u9053\u5e94\u7528\u5c42\u5728\u5e72\u4ec0\u4e48\u201d\u7684\u60c5\u51b5\u3002<\/p>\n \u7b2c\u4e8c\u4e2a\u95ee\u9898\u662fQUIC\u7684\u6027\u80fd\u95ee\u9898\u3002<\/strong><\/div>\n TCP\u867d\u7136\u4e5f\u662f\u5f88\u8001\u7684\u534f\u8bae\uff0c\u4f46\u5e94\u7528\u5e7f\u6cdb\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u4e2d\u6709\u5bf9\u5e94\u7684\u5904\u7406\u4ee3\u7801\uff0cBBR\u4e4b\u7c7b\u7684\u65b0\u7279\u6027\u4e5f\u53ef\u4ee5\u5927\u5e45\u63d0\u5347TCP\u7684\u6027\u80fd\u3002\u4f46\u662fQUIC\u653e\u5f03\u4e86TCP\uff0c\u636eGoogle\u7684\u6587\u6863\uff0c\u6070\u6070\u662f\u56e0\u4e3aTCP\u592a\u7a33\u5b9a\u4e86\uff0c\u5185\u6838\u91cc\u7684\u4ee3\u7801\u66f4\u65b0\u7279\u522b\u9ebb\u70e6\u3002\u6b64\u5916\uff0c\u56e0\u4e3aLinux\u5185\u6838\u8bbe\u8ba1\u4e4b\u521d\u5e76\u6ca1\u6709\u8003\u8651\u591a\u6838\u7684\u6269\u5c55\u95ee\u9898\uff0c\u5728\u591a\u6838(core)\u60c5\u51b5\u4e0b\u53cd\u800c\u4f1a\u4ea7\u751f\u53cd\u590d\u7684\u9677\u6838\uff0c\u9020\u6210\u8fdb\u7a0b\u963b\u585e\uff0c\u4e25\u91cd\u5f71\u54cd\u6027\u80fd\u3002<\/p>\n \u9488\u5bf9\u4e0a\u9762\u7684\u95ee\u9898\uff0c\u4e0d\u5c11\u65b0\u7684\u65b9\u6848\u90fd\u628a\u7f51\u7edc\u534f\u8bae\u6808\u653e\u5230\u7528\u6237\u6001\u5904\u7406\uff0cQUIC\u4e5f\u987a\u5e94\u4e86\u8fd9\u79cd\u5927\u6f6e\u6d41\u3002\u552f\u4e00\u7684\u95ee\u9898\u662f\uff0cUDP\u7684\u534f\u8bae\u6808\u4f3c\u4e4e\u8fd8\u6ca1\u6709\u73b0\u6210\u7684\u8ba9\u4eba\u6ee1\u610f\u7684\u65b9\u6848\uff0c\u6216\u8bb8\u6211\u4eec\u8fd8\u5f97\u518d\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\uff0c\u624d\u80fd\u7528\u4e0a\u53ef\u9760\u9ad8\u6548\u7684\u65b9\u6848\u3002<\/p>\n \u7b2c\u4e09\u4e2a\u95ee\u9898\u662f\u670d\u52a1\u7aef\u63a8\u9001\u3002<\/strong><\/div>\n \u867d\u7136\u5f88\u591a\u4eba\u5f88\u60f3\u8981\u8fd9\u4e2a\u7279\u6027\uff0c\u800c\u4e14HTTP\/2\u4e5f\u786e\u5b9e\u52a0\u5165\u4e86\u5b83\uff0c\u4f46\u5173\u4e8e\u5b83\u7684\u5e94\u7528\u4ecd\u7136\u5b58\u5728\u8bb8\u591a\u4e89\u8bae\u3002\u7b80\u5355\u8bf4\uff0cHTTP\/2\u7684\u63a8\u9001\u6253\u7834\u4e86HTTP\u4f20\u7edf\u7684\u201c\u4e00\u95ee\u4e00\u7b54\u201d\u7684\u901a\u8baf\u6a21\u5f0f\uff0c\u5728\u5ba2\u6237\u7aef\u6ca1\u6709\u8bf7\u6c42\u7684\u65f6\u5019\uff0c\u670d\u52a1\u7aef\u5c31\u53ef\u4ee5\u7ed9\u5ba2\u6237\u7aef\u53d1\u9001\u6570\u636e\uff0c\u8fd9\u96be\u514d\u88ab\u6ee5\u7528(\u60f3\u60f3\u968f\u5904\u53ef\u89c1\u7684\u90a3\u4e9b\u6700\u559c\u6b22\u201c\u5728\u5546\u8a00\u5546\u201d\uff0c\u6700\u4e0d\u559c\u6b22\u8c08\u201c\u9053\u5fb7\u201d\u7684\u7559\u8a00\u5427)\uff0c\u5c3d\u7ba1Chrome\u7684\u5f00\u53d1\u4eba\u5458\u8bf4\u5b83\u4eec\u4f1a\u68c0\u67e5\u63a8\u9001\u5e76\u963b\u6b62\u6076\u610f\u5185\u5bb9\uff0c\u90a3\u4e5f\u662f\u8981\u5728\u6536\u5230\u63a8\u9001\u6570\u636e\u4e4b\u540e\u8fdb\u884c\uff0c\u8fd9\u4e2a\u65b9\u6848\u5e76\u4e0d\u5b8c\u5584\u3002<\/p>\n \u540c\u65f6\uff0c\u670d\u52a1\u7aef\u4e5f\u53ef\u80fd\u4e0d\u987e\u5ba2\u6237\u7aef\u7684\u7f13\u5b58\uff0c\u6267\u610f\u91cd\u590d\u63a8\u9001\uff0c\u9020\u6210\u5e26\u5bbd\u6d6a\u8d39\u3002HTTP\/3\u4fdd\u7559\u4e86\u63a8\u9001\uff0c\u4f46\u673a\u5236\u6709\u6240\u4e0d\u540c\u3002\u5ba2\u6237\u7aef\u9700\u8981\u5148\u540c\u610f\uff0c\u670d\u52a1\u7aef\u624d\u53ef\u4ee5\u63a8\u9001\u3002\u800c\u4e14\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u8bbe\u7f6e\u670d\u52a1\u7aef\u63a8\u9001\u4e0a\u9650\uff0c\u8d85\u8fc7\u4e0a\u9650\u7684\u63a8\u9001\u4f1a\u51fa\u9519\u3002\u5c3d\u7ba1\u5982\u6b64\uff0c\u63a8\u9001\u5982\u4f55\u80fd\u59a5\u5584\u5229\u7528\uff0c\u76ee\u524d\u8fd8\u6ca1\u6709\u516c\u8ba4\u660e\u786e\u7684\u7b54\u6848\u3002<\/p>\n \u6700\u540e\u4e00\u4e2a\u95ee\u9898\u6765\u81ea\u8c03\u8bd5\u548c\u652f\u6301\u7684\u5de5\u5177\u3002<\/strong><\/div>\n \u4efb\u4f55\u6280\u672f\u8981\u60f3\u5927\u89c4\u6a21\u5de5\u7a0b\u5e94\u7528\uff0c\u9760\u201c\u6807\u51c6\u5b9e\u73b0\u201d\u5355\u6253\u4e00\u80af\u5b9a\u662f\u4e0d\u884c\u7684\uff0c\u56e0\u4e3a\u65e0\u6cd5\u5207\u7247\uff0c\u65e0\u6cd5\u7ec6\u7c92\u5ea6\u8c03\u8bd5\u3002\u5728\u7ecf\u5178\u7684HTTP\u6280\u672f\u6808\u4e2d\uff0c\u5404\u5c42\u90fd\u6709\u5bf9\u5e94\u7684\u5de5\u5177\uff0c\u6bd4\u5982IP\u5c42\u6709ping\u548ctraceroute\uff0c\u4f20\u8f93\u5c42\u6709telnet\uff0c\u5e94\u7528\u5c42\u6709curl\uff0c\u6b63\u662f\u6709\u8fd9\u4e9b\u5de5\u5177\u7c07\u62e5\u7740\uff0c\u5f00\u53d1\u4eba\u5458\u624d\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u5b9a\u4f4d\u95ee\u9898\u6240\u5904\u7684\u5c42\u6b21\u548c\u7ec6\u8282\u3002HTTP\/2\u867d\u7136\u6709\u6539\u52a8\uff0c\u4f46\u8c03\u8bd5\u5de5\u5177\u4e5f\u4e0d\u5c11\uff0ccurl\u53ef\u4ee5\u652f\u6301\uff0c\u8fd8\u6709nghttp2\u3001h2c\u7b49\u5de5\u5177\uff0c\u521d\u6b65\u5f62\u6210\u4e86\u5b8c\u6574\u7684\u4f53\u7cfb\u3002HTTP\/3\u7684\u6539\u52a8\u5f88\u5927\uff0c\u5982\u679c\u6ca1\u6709\u5bf9\u5e94\u7684\u8c03\u8bd5\u652f\u6301\u5de5\u5177\uff0c\u53ef\u4ee5\u60f3\u8c61\u90e8\u7f72\u548c\u8fc1\u79fb\u90fd\u4e0d\u4f1a\u5bb9\u6613\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u672f\u7684\u53d1\u5c55\u603b\u662f\u8ba9\u4eba\u76ee\u4e0d\u6687\u63a5\uff0c2018\u5e7410\u6708\uff0cHTTP\/3\u53c8\u53d1\u5e03\u4e86\u3002\u867d\u7136\u5df2\u7ecf\u6709\u4e00\u4e9b\u4e2d\u6587\u6280\u672f\u5a92\u4f53\u505a\u4e86\u62a5\u9053\uff0c\u4f46\u5927\u591a\u6570\u662f\u7ffb\u8bd1\u7684\uff0c\u800c\u4e14\u5185\u5bb9\u5927\u540c\u5c0f\u5f02\u3002\u6700\u8fd1\u6211\u4e13\u95e8\u5b66\u4e60\u4e86\u70b9\u5173\u4e8eHTTP\/3\u7684\u77e5\u8bc6\uff0c\u5728\u8fd9\u91cc\u968f\u4fbf\u5199\u5199\uff0c\u548c\u5927\u5bb6\u505a\u4e2a\u5206\u4eab\u3002<\/p>\n","protected":false},"author":370,"featured_media":51994,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-149183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/149183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=149183"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/149183\/revisions"}],"predecessor-version":[{"id":149202,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/149183\/revisions\/149202"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/51994"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=149183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=149183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=149183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |