tcp connection splitter

Anton Yuzhaninov citrin at citrin.ru
Thu Apr 12 19:50:28 UTC 2007


Hello Daniel,

You wrote on Thursday, April 12, 2007, 11:08:49 PM:

DT> I could use read-write locks here (single writer,
DT> multiple readers) but it doesn't help with write
DT> lock contention.

DT> There must be some clever lockless algorithm to
DT> achieve the same effect.

Try see FSM server model (e. g. using libevent). If all clients served
by single thread, and signle process (using noblocking sockets) then
no locks need.

This model scale up to 50k-100k connections per host.

-- 
 Anton Yuzhaninov.



More information about the freebsd-hackers mailing list