<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
text-align:justify;
text-justify:inter-ideograph;
font-size:12.0pt;
font-family:DengXian;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:DengXian;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">I test nginx-quic with ngtcp2:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">~/ngtcp2/examples/client 127.0.0.1 443 https://example.com:443/index.html --dcid=1a812bf8290b2bd5<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">And same dcid not always hash to same worker</span><span style="font-size:10.5pt">,<span lang="EN-US">as access.log:<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">127.0.0.1 - - [10/Mar/2021:14:04:00 +0800] "GET /index.html HTTP/3.0" 200 788 "-" "nghttp3/ngtcp2 client" "quic" "h3-29" 88 9149<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">127.0.0.1 - - [10/Mar/2021:14:04:05 +0800] "GET /index.html HTTP/3.0" 200 788 "-" "nghttp3/ngtcp2 client" "quic" "h3-29" 94 9149<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">127.0.0.1 - - [10/Mar/2021:14:04:09 +0800] "GET /index.html HTTP/3.0" 200 788 "-" "nghttp3/ngtcp2 client" "quic" "h3-29" 100 9147<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333;background:#F9F9F9">The last column shows nginx worker pid<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333;background:#F9F9F9"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333;background:#F9F9F9">Nginx.conf:<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333;background:#F9F9F9"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">worker_processes 4;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">error_log logs/error.log debug;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">events {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> worker_connections 1024;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">quic_bpf on;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">http {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> log_format quic '$remote_addr - $remote_user [$time_local] '<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> '"$request" $status $body_bytes_sent '<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> '"$http_referer" "$http_user_agent" "$quic" "$http3" $connection $pid';<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> access_log logs/access.log quic;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> server {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> listen 443 http3 reuseport;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> listen 443 ssl;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> ssl_certificate server.crt;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> ssl_certificate_key server.key;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> ssl_protocols TLSv1.3;<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> location / {<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> add_header Alt-Svc '$http3=":443"; ma=86400';<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"> }<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">sbin/nginx -V<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">nginx version: nginx/1.19.7<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">built by gcc 8.4.0 (Ubuntu 8.4.0-3ubuntu2)<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">TLS SNI support enabled<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">configure arguments: --with-debug --with-http_v3_module --with-http_quic_module --with-cc-opt=-I../boringssl/include --with-ld-opt='-L../boringssl/build/ssl
-L../boringssl/build/crypto'<o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">uname -a<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt">Linux nginx-quic 5.10.0-051000-generic #202012132330 SMP Sun Dec 13 23:33:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Gao,Yan(ACG VCP)
</span><span lang="EN-US" style="font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="color:black">发件人</span></b><b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">:
</span></b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">"Gao,Yan(ACG VCP)" <gaoyan09@baidu.com><br>
</span><b><span style="color:black">日期</span></b><b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">:
</span></b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">2021</span><span style="color:black">年</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">3</span><span style="color:black">月</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">10</span><span style="color:black">日</span><span style="font-family:"Calibri",sans-serif;color:black">
</span><span style="color:black">星期三</span><span style="font-family:"Calibri",sans-serif;color:black">
</span><span style="color:black">上午</span><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">11:17<br>
</span><b><span style="color:black">收件人</span></b><b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">:
</span></b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">"nginx-devel@nginx.org" <nginx-devel@nginx.org>, "vl@nginx.com" <vl@nginx.com><br>
</span><b><span style="color:black">主题</span></b><b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">:
</span></b><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:black">Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:宋体"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black">Hello
</span><span lang="EN-US" style="font-size:13.5pt;font-family:"Arial",sans-serif;color:black">Vladimir Homutov</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black">,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:13.5pt;font-family:"Arial",sans-serif;color:black">></span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black">I'm not sure I understand what you
are trying to do.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US" style="font-size:13.5pt;font-family:"Arial",sans-serif;color:black">></span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black">Do you have some issues with existing
quic implementations in nginx?</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif">I just want to know how nginx handle old and new quic connections when reload.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif">Nginx keep quic connections open when reload to complete old connections.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif">But new connections can still be handled by old workers.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif">Can the listening fd detach from reuseport group with keeping open, as kernel says, ebpf only look up an unconnected socket for a packet (UDP)</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black">Gao,Yan(ACG VCP)
</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>