DragonFly BSD
DragonFly users List (threaded) for 2006-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: load balancing

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Oct 2006 16:48:35 -0800 (PST)

:are you thinking of a way to bond two file descriptors together?  that wo=
:uld be nice.  first you do all header processing and whatnot, and then yo=
:u just say
:bond_fd(server_fd /* read side */, client_fd /* write side */);
:and you can't read on server_fd anymore, and all data arriving there will=
: be directly written to client_fd.  this way you still could read the cli=
:ent piplined/keep-alive headers, but once your server has initiated trans=
:fers, you are not interested in seeing the data from the server any more,=
: it should just pass the box into the other tcp stream.  you could even r=
:ecycle the mbuf, if you optimize the bonding deep enough - basically a se=
:ndfile for sockets.
:  simon

    It is theoretically possible to bond two sockets together and 
    transfer the data at the mbuf layer, which would yield a zero-copy


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]