README
1NAME
2
3 Starman - High-performance preforking PSGI/Plack web server
4
5SYNOPSIS
6
7 # Run app.psgi with the default settings
8 > starman
9
10 # run with Server::Starter
11 > start_server --port 127.0.0.1:80 -- starman --workers 32 myapp.psgi
12
13 # UNIX domain sockets
14 > starman --listen /tmp/starman.sock
15
16 Read more options and configurations by running `perldoc starman`
17 (lower-case s).
18
19DESCRIPTION
20
21 Starman is a PSGI perl web server that has unique features such as:
22
23 High Performance
24
25 Uses the fast XS/C HTTP header parser
26
27 Preforking
28
29 Spawns workers preforked like most high performance UNIX servers do.
30 Starman also reaps dead children and automatically restarts the
31 worker pool.
32
33 Signals
34
35 Supports HUP for graceful worker restarts, and TTIN/TTOU to
36 dynamically increase or decrease the number of worker processes, as
37 well as QUIT to gracefully shutdown the worker processes.
38
39 Superdaemon aware
40
41 Supports Server::Starter for hot deploy and graceful restarts.
42
43 Multiple interfaces and UNIX Domain Socket support
44
45 Able to listen on multiple interfaces including UNIX sockets.
46
47 Small memory footprint
48
49 Preloading the applications with --preload-app command line option
50 enables copy-on-write friendly memory management. Also, the minimum
51 memory usage Starman requires for the master process is 7MB and
52 children (workers) is less than 3.0MB.
53
54 PSGI compatible
55
56 Can run any PSGI applications and frameworks
57
58 HTTP/1.1 support
59
60 Supports chunked requests and responses, keep-alive and pipeline
61 requests.
62
63 UNIX only
64
65 This server does not support Win32.
66
67PERFORMANCE
68
69 Here's a simple benchmark using Hello.psgi.
70
71 -- server: Starman (workers=10)
72 Requests per second: 6849.16 [#/sec] (mean)
73 -- server: Twiggy
74 Requests per second: 3911.78 [#/sec] (mean)
75 -- server: AnyEvent::HTTPD
76 Requests per second: 2738.49 [#/sec] (mean)
77 -- server: HTTP::Server::PSGI
78 Requests per second: 2218.16 [#/sec] (mean)
79 -- server: HTTP::Server::PSGI (workers=10)
80 Requests per second: 2792.99 [#/sec] (mean)
81 -- server: HTTP::Server::Simple
82 Requests per second: 1435.50 [#/sec] (mean)
83 -- server: Corona
84 Requests per second: 2332.00 [#/sec] (mean)
85 -- server: POE
86 Requests per second: 503.59 [#/sec] (mean)
87
88 This benchmark was processed with ab -c 10 -t 1 -k on MacBook Pro 13"
89 late 2009 model on Mac OS X 10.6.2 with perl 5.10.0. YMMV.
90
91NOTES
92
93 Because Starman runs as a preforking model, it is not recommended to
94 serve the requests directly from the internet, especially when slow
95 requesting clients are taken into consideration. It is suggested to put
96 Starman workers behind the frontend servers such as nginx, and use HTTP
97 proxy with TCP or UNIX sockets.
98
99AUTHOR
100
101 Tatsuhiko Miyagawa <miyagawa@bulknews.net>
102
103 Andy Grundman wrote Catalyst::Engine::HTTP::Prefork, which this module
104 is heavily based on.
105
106 Kazuho Oku wrote Net::Server::SS::PreFork that makes it easy to add
107 Server::Starter support to this software.
108
109COPYRIGHT
110
111 Tatsuhiko Miyagawa, 2010-
112
113LICENSE
114
115 This library is free software; you can redistribute it and/or modify it
116 under the same terms as Perl itself.
117
118SEE ALSO
119
120 Plack Catalyst::Engine::HTTP::Prefork Net::Server::PreFork
121
122