On 29/04/2025 22:19, Otto Moerbeek wrote: > If you looks more closely you'll see that resuseport and UDP do not > work well together for the multithreaded case. Alls packets end up in > one thread.
Yes, so in you comment bellow I believe you meant "does *NOT* handle ... multi-threaded case very well", correct? According to a few tests I've done with pthread code as well as fork() and SO_REUSEPORT, all connections end up in the same thread/process. Fixing this would require something like SO_REUSEPORT_LB, like FreeBSD and DragonFly did, or intervention on the daemon side to do the load balancing? Alternatively running multiple 1-thread daemons and do some kind of load balancing on the system, say with relayd. thanks, G On 29/04/2025 18:11, Otto Moerbeek wrote: > IIRC OpenBSD does handle sending to a non-blocking socket in the > multi-threaded case very well. If multiple threads try to do that > simulteneously, some of them will get a EAGAIN. To test this > hypothesis, try running with a single thread and see if the errors > disappear.