Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 5:14 PM, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already know that it will be > >> very > >> expensive CPU wise if workers are spawned on each request. If

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
I have a machine with several websites one of which is quite busy this time of year.  I have another that had its joomla comments on and open and the spammers found it.  They managed to get 700,000 comments into the system before we caught it, but the traffic and strain on the MySQL server and t

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
"It works pretty well until its under attack by the spammers." Can you elaborate/explain further? b. On 29 March 2011 01:14, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already k

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
Nathan Nobbe wrote: > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > >> If you need high performance you probably already know that it will be >> very >> expensive CPU wise if workers are spawned on each request. If you don't, >> I >> would not bother with daemon and just use xinetd

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > If you need high performance you probably already know that it will be very > expensive CPU wise if workers are spawned on each request. If you don't, I > would not bother with daemon and just use xinetd. You can always add > daemon-handlin

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
If you need high performance you probably already know that it will be very expensive CPU wise if workers are spawned on each request. If you don't, I would not bother with daemon and just use xinetd. You can always add daemon-handling stuff later on. Well I do hope you find a good working solutio

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 12:38 PM, Bostjan Skufca wrote: > Xinetd will definitely be faster way than coding your daemon in PHP. > In this case: > You have to consider many other things as well: > - do your worker processes run under various UIDs (do they do > setuid/setgid)? > no > - do your w

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
Xinetd will definitely be faster way than coding your daemon in PHP. You have to consider many other things as well: - do your worker processes run under various UIDs (do they do setuid/setgid)? - do your workers die after processing each request/client or do they process multiple connections? - d

[PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
Hi, I'd like to bat around some pros / cons of selecting xinetd to implement a socket server. From my perspective the list is something like this: xinetd pros . no need to rewrite forking functionality, 'server' can be written as simple php script . forking potentially faster than php-based im