Closed jvdwrf closed 2 years ago
To make the question a bit more clear, I see a few methods to do this:
bidi_stream
to a process on another machine. This can exponentially increase the amount of streams, since every unique combination of processes could have a unique stream.uni_stream
which it can use to send messages to another process. Replies will be sent back to a single process, which then forwards the reply to the original sender.bidi_stream
which all processes use. This stream is then multiplexed to all processes, both on sending-side and receiving side using channels.Large numbers of streams is a supported case. Each active stream has a modest amount of memory overhead, particularly if the peer is sending data faster than you're reading it, so you should think carefully about resource exhaustion risks before raising the limits that high, and perhaps shrink the per-stream flow control windows, but it's not necessarily a bad idea; large numbers of channels, for example, have fundamentally the same issue.
Okay thats perfect. I'll try to use the quic streams directly then and see how that works out.
Hi,
I would like to use Quinn within another library, but I am wondering about my overall architecture. I would like to have many processes on one machine communicate with many on another machine.
I saw that the default
max_bidi_streams
andmax_uni_streams
are set to 100. Is it recommended to have connections multiplexed over the QUIC or should I build a custom abstraction on top of QUIC? I'm talking about (many) millions of multiplexed streams here.Thanks, Jasper