Re: unix domain sockets vs. internet sockets
From: Bakul Shah (bakul_at_BitBlocks.com)
Date: 02/25/05
- Previous message: Robert Watson: "Re: unix domain sockets vs. internet sockets"
- In reply to: Baris Simsek: "unix domain sockets vs. internet sockets"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "Baris Simsek" <simsek@enderunix.org> Date: Fri, 25 Feb 2005 07:33:04 -0800
> I am coding a daemon program. I am not sure about which type of sockets i
> should use. Could you compare ip sockets and unix domain sockets? My main
> criterions are performance and protocol load. What are the differences
> between impelementations of them at kernel level?
If you *don't want* remote processes access to your daemon,
use unix sockets and you don't have to worry about security
issues as much. This is the main reason for choosing one
over the other. You should also structure your code so that
you can change the choice later (as well as use SSL if
necessary).
Answering what you didn't ask :-)
Socket implementation performance differences is the wrong
thing to worry about this early in the game. Instead of
trying to make it `as fast as possible', it might make more
sense to think about what is the expected load (or setting
load goals) and how to meet the required performance by
making sure the machine has enough resources and making sure
you can measure relevant performance parameters at any time.
How you modularize your daemon, protocol design (if you have
control over it), available memory, disk speed and data
organization (if you are accessing lots of data), algorithm
design, whether you can distribute load across machines etc.
will have a much bigger influence on overall performance than
the choice of socket type. You *never* have enough time to
optimize everything so setting realistic performance goals
helps you meet them sooner -- you fix the top N bottlenecks
(which change as you tighten things) and stop when done!
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
- Previous message: Robert Watson: "Re: unix domain sockets vs. internet sockets"
- In reply to: Baris Simsek: "unix domain sockets vs. internet sockets"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|