The explanation I got when I looked into it before is that the localhost portion of the TCP stack has been crazy optimized, so it's basically no worse than domain sockets.
2010/8/4 Bahadır Doğan <[email protected]> > I didn't perform a performance test to see which one is faster. But I do > not > understand why domain sockets are not faster. It doesn't enter the > networking stack, so it should be faster? > > On Wed, Aug 4, 2010 at 9:24 PM, Rush Manbert <[email protected]> wrote: > > > I certainly agree on that. There's no performance improvement. > > > > - Rush > > > > On Aug 4, 2010, at 11:03 AM, Bryan Duxbury wrote: > > > > > I apologize for being ambiguous in my prior email. I meant to say that > > unix > > > sockets are no *faster* than TCP sockets. You are correct that there > are > > > other benefits. I'd certainly accept patches for domain sockets if they > > were > > > well done. > > > > > > On Wed, Aug 4, 2010 at 10:51 AM, Rush Manbert <[email protected]> > wrote: > > > > > >> I don't want to start a debate, but I beg to differ. Unix domain > sockets > > >> have a couple of nice features: > > >> 1) They don't offer any way for an outsider to access your service, > > which > > >> is possible if you make a mistake using TCP sockets. The domain > sockets > > >> don't offer an attack point for a hacker. > > >> 2) There are no port numbers to deal with, which just makes things > > simpler. > > >> > > >> My Thrift-in-Windows patch ( > > >> https://issues.apache.org/jira/browse/THRIFT-591) adds an Asio > > >> implementation that works for both *nix and Windows (C++ only) and > adds > > Unix > > >> Domain Socket support. Caveat emptor, of course, but we're using it in > > >> production on Mac OS X and Windows so that local applications can talk > > to a > > >> daemon running as a service. > > >> > > >> - Rush > > >> > > >> On Aug 4, 2010, at 10:04 AM, Bryan Duxbury wrote: > > >> > > >>> I thought the same thing and did some exploration. Ultimately, I > > >> determined > > >>> that domain sockets are no better than TCP sockets, even against > > >> localhost. > > >>> I recommend you just use TCP. > > >>> > > >>> -Bryan > > >>> > > >>> 2010/8/4 Bahadır Doğan <[email protected]> > > >>> > > >>>> Hello > > >>>> > > >>>> Is there any attempt to use Unix Domain Sockets as the > transportation > > >> layer > > >>>> with Thrift? > > >>>> Isn't it nice to make server and client applications in the same > > machine > > >>>> talking with Thrift? Or am I wrong? > > >>>> > > >>>> Thanks. > > >>>> > > >> > > >> > > > > >
