Welcome! Log In Create A New Profile

Advanced

Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload

March 10, 2021 01:12AM
I test nginx-quic with ngtcp2:
~/ngtcp2/examples/client 127.0.0.1 443 https://example.com:443/index.html --dcid=1a812bf8290b2bd5

And same dcid not always hash to same worker,as access.log:
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
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
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

The last column shows nginx worker pid

Nginx.conf:

worker_processes 4;
error_log logs/error.log debug;

events {
worker_connections 1024;
}

quic_bpf on;

http {
log_format quic '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$quic" "$http3" $connection $pid';

access_log logs/access.log quic;

server {
listen 443 http3 reuseport;
listen 443 ssl;

ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_protocols TLSv1.3;

location / {
add_header Alt-Svc '$http3=":443"; ma=86400';
}
}
}

sbin/nginx -V
nginx version: nginx/1.19.7
built by gcc 8.4.0 (Ubuntu 8.4.0-3ubuntu2)
built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
TLS SNI support enabled
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'


uname -a
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

Gao,Yan(ACG VCP)

发件人: "Gao,Yan(ACG VCP)" <gaoyan09@baidu.com>
日期: 2021年3月10日 星期三 上午11:17
收件人: "nginx-devel@nginx.org" <nginx-devel@nginx.org>, "vl@nginx.com" <vl@nginx.com>
主题: Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload

Hello Vladimir Homutov,

>I'm not sure I understand what you are trying to do.
>Do you have some issues with existing quic implementations in nginx?


I just want to know how nginx handle old and new quic connections when reload.
Nginx keep quic connections open when reload to complete old connections.
But new connections can still be handled by old workers.
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)

Gao,Yan(ACG VCP)
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload

gaoyan09 407 March 09, 2021 10:18PM

Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload

gaoyan09 233 March 10, 2021 01:12AM

Re: [QUIC] When old worker listen fd detach ebpf reuseport group when reload

Vladimir Homutov 410 March 10, 2021 02:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 194
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready