Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP/QUIC/Http3 quiche::h3 Client/Connector integration #524

Open
wants to merge 51 commits into
base: main
Choose a base branch
from

Conversation

hargut
Copy link
Contributor

@hargut hargut commented Feb 3, 2025

Overview

The PR builds on top of #514 and integrates Quiche/Http3 with pingora-core on the client side. It provides another part to integrate QUIC support in pingora.

During the works several common client/server areas have been unified and modelled for according reuse. Further some issues with the listener implementation had been identified and fixed.

For additional details please refer to #514 and #95.

Have a nice week and stay safe! 😃

Kind regards,
Harald

hargut added 30 commits January 2, 2025 12:18
currently add quiche dependency only on boringssl feature
quiche does not link correctly with the openssl feature
rustls is currently not supported in quiche

the QUIC/HTTP3 change affects lots of modules and files
therefore currently not using a compile-time feature
sources
cloudflare/quiche@0570ab83/apps/src/bin/quiche-server.rs
cloudflare/quiche@0570ab83/apps/src/sendto.rs

adjust for tokio::net::UdpSocket
refactor quic.rs to into a module to enhance structure

quic::Listener maintains a map with ConnectionIds => ConnectionHandles
ConnectionHandles correspond to Connections, both having states like `Incoming` & `Established`

the ConnectionHandles are used to forward UDP datagrams to the according quic::Connection

while the connection is in the `Incoming` state the data is sent through mpcs::channels,
once `Established` the data is directly received on the quiche::Connection

possible enhancements:
use type state pattern during quic::tls_handshake
move tls_handshake to protocols::l4::tls::quic
enhance Quic handshake:
- loop send & receive
- error handling, logging

read multiple body chunks in EchoApp
H3 session trailers, idle
add some documentations
move socket to socket_details
remove HandshakeResponse::Rejected
hargut added 21 commits January 23, 2025 19:05
on several stream related calls through ConnectionIo
capacity, send_body, read_body, finish_send, shutdown

fixes read_body:
use Event::Finished on read
limit body receive max size
chunked reads

fixes ConnectionTx:
update max_udp_dgram_size before sending
build default quiche/http3 config within tls::quic::Connector
including the ServerConf parameters

allow using rustls & quic-boringssl and
overriding quiche/http3 config from peer options

correctly route h3 in Connector::new_stream
needs cargo --nocapture as plot library uses println
remove duplicated drop, tasks are stopped on the Connection drop
avoid unused allocations, remove log
… CA initializations

fix more_streams_allowed detection
…uiche-connector

# Conflicts:
#	pingora-core/Cargo.toml
#	pingora-core/src/connectors/l4.rs
#	pingora-core/src/protocols/http/client.rs
#	pingora-core/src/protocols/http/server.rs
#	pingora-core/src/upstreams/peer.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant