File: INSTALL

package info (click to toggle)
superd 0.0.3-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 136 kB
  • ctags: 85
  • sloc: ansic: 721; makefile: 103; sh: 27
file content (69 lines) | stat: -rw-r--r-- 2,065 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
thanks for looking at superd.  superd turns any program that normally talks to standard in and
standard out into a high speed server.  it's similar in functionality
to inetd and Dan Bernstein's tcpserver
(http://cr.yp.to/ucspi-tcp/tcpserver.html), but it uses preforking and
file descriptor passing such that it's practical for high speed
servers.  it doesn't compete with either of these programs since it's
meant for application-specific servers, like dedicated mail servers.
inetd and tcpserver are more designed for services that won't be hit
too hard.

superd was inspired by the fact that qmail's smtpd doesn't handle its
own passive tcp socket.  to use it, try (as root):

    superd 25 /var/qmail/bin/qmail-smtpd


the  homepage: http://viscous.org/superd

comments: john@viscous.org

what you need to make this work:
     -solaris 2.x (preferably 2.7) or linux
     -gcc, make, as, ld, /bin/sh... typical stuff


SETUP AND INSTALLATION:
-unpack and install sqmail in the same parent as qmail.  (x.y.z is the
version number.)
	  
	gunzip -c superd-x.y.z.tar.gz | tar xf -
	  
-change to the superd directory:

	cd superd-x.y.z

-build it:

	make

-copy the binary wherever you like:

      cp  superd /usr/local/bin


RUNNING:

the general syntax is:

      superd port argv0 argv1 ...

argv0 is the command you want to run.  all command line arguments
after the command you want to run will be passed along to the program
itself.  a hello world server:

      superd 5000 /bin/echo hello world

by default, superd preforks 20 handler processes and sets the listen
queue for the passive tcp socket to 10.  this means that the server
can handle 20 simultaneous connections and 10 additional clients can
connect and wait for a server to be available.  after that, clients
will get a "connection refused."  to change these numbers:

     superd -m 100 -l 15 /bin/echo holy preforked process, batman!

this will prefork 100 minion processes and set the listen queue to
15.  if you want to see debugging output, just use the -d option to
direct it to a file.