lsquic icon indicating copy to clipboard operation
lsquic copied to clipboard

Multi-threading and path changing support

Open alexpokotilo opened this issue 1 year ago • 3 comments

Lsquic is great and thanks for sharing this work!

I need to support many(thousands) http3 connections with huge output bandwidth(Gigs per seconds). Requests are small, replies are big. I decided to read UDP socket in single listen thread, copy datagrams and peer/local addrs and forward to worker threads. Each Worker has it's engine. I split clients based on hash or peer addr and port. But what should I need to support changing path when peer addr becomes different ? Thank in advance!

p.s If my design may be simplified - I'm open to change it.

alexpokotilo avatar Aug 21 '24 14:08 alexpokotilo

@dtikhonov Dmitri, I'm sorry bothering you by direct mention, but could you please suggest what to do in this case ?

alexpokotilo avatar Aug 23 '24 06:08 alexpokotilo

@dtikhonov, just comfirm I need to use lsquic_cid_from_packet to route udp packet into right worker in case of changing route. It's all I need to hear. I got Idea from here https://github.com/litespeedtech/openlitespeed/blob/master/src/quic/udplistener.cpp

alexpokotilo avatar Aug 23 '24 11:08 alexpokotilo

The approach in OpenLiteSpeed will work just fine. In other words, yes, you can use lsquic_cid_from_packet().

dtikhonov avatar Oct 18 '25 10:10 dtikhonov