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

Re: load balancing

From: Oliver Fromme <check+j83jfn00rs5nc9y9@xxxxxxxxxx>
Date: 02 Nov 2006 09:47:16 GMT

Matthew Dillon wrote:
 > > are you thinking of a way to bond two file descriptors together?
 > > that would be nice. first you do all header processing and whatnot,
 > > and then you 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 client piplined/keep-alive headers, but once your
 > > server has initiated transfers, 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 recycle the mbuf, if
 > > you optimize the bonding deep enough - basically a sendfile for
 > > sockets.
 >    It is theoretically possible to bond two sockets together and 
 >    transfer the data at the mbuf layer, which would yield a zero-copy
 >    solution.

Just out of curiosity ...  For which protocols would that
actually be useful adn efficient in the "real world"?
I can think of FTP data connections, but not much else.

It's probably not useful for HTTP, because most of these
should be "keep alive" and/or use transfer encodings (which
Apache does by default for HTTP/1.1 connections).

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd

Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

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