Re:Monoio – A thread-per-core Rust async runtime with io_uring
by mleonhard on Thursday December 09, 2021 @07:30AM
(#29496609)
If you need to handle <100,000 sockets, you will probably be fine with a thread per socket. Call set_read_timeout to implement the deadline. Run load tests and adjust the socket limit.
Async lets one process handle millions of sockets.
If you want to handle millions of sockets with threads, you can use `mio` [0]. Mio's API has footguns that can cause UB. If your wire protocol is complicated, you may find yourself implementing something like async, but worse.
Async lets one process handle millions of sockets.
If you want to handle millions of sockets with threads, you can use `mio` [0]. Mio's API has footguns that can cause UB. If your wire protocol is complicated, you may find yourself implementing something like async, but worse.
[0] https://crates.io/crates/mio