Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 146 lines (93 sloc) 3.856 kb
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
1 package Starman;
e4ae7eb @miyagawa Initial commit
authored
2
3 use strict;
4 use 5.008_001;
eb326d5 @miyagawa Checking in changes prior to tagging of version 0.2014.
authored
5 our $VERSION = '0.2014';
e4ae7eb @miyagawa Initial commit
authored
6
7 1;
8 __END__
9
10 =encoding utf-8
11
12 =for stopwords
13
14 =head1 NAME
15
3d1302f @miyagawa Added Plack to NAME for SEO on search.cpan.org
authored
16 Starman - High-performance preforking PSGI/Plack web server
e4ae7eb @miyagawa Initial commit
authored
17
18 =head1 SYNOPSIS
19
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
20 # Run app.psgi with the default settings
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored
21 > starman
e4ae7eb @miyagawa Initial commit
authored
22
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
23 # run with Server::Starter
1132d08 @miyagawa fix pods
authored
24 > start_server --port 127.0.0.1:80 -- starman --workers 32 myapp.psgi
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
25
26 # UNIX domain sockets
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored
27 > starman --listen /tmp/starman.sock
e4ae7eb @miyagawa Initial commit
authored
28
29 =head1 DESCRIPTION
30
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored
31 Starman is a PSGI perl web server that has unique features such as:
e4ae7eb @miyagawa Initial commit
authored
32
33 =over 4
34
35 =item High Performance
36
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
37 Uses the fast XS/C HTTP header parser
e4ae7eb @miyagawa Initial commit
authored
38
39 =item Preforking
40
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored
41 Spawns workers preforked like most high performance UNIX servers
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored
42 do. Starman also reaps dead children and automatically restarts the
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored
43 worker pool.
44
45 =item Signals
46
5115bfa @miyagawa Simplified HUP handling to just restart workers by propagating HUP. #34
authored
47 Supports C<HUP> for graceful worker restarts, and C<TTIN>/C<TTOU> to
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored
48 dynamically increase or decrease the number of worker processes.
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
49
e4ae7eb @miyagawa Initial commit
authored
50 =item Superdaemon aware
51
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
52 Supports L<Server::Starter> for hot deploy and graceful restarts.
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
53
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored
54 =item Multiple interfaces and UNIX Domain Socket support
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
55
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored
56 Able to listen on multiple intefaces including UNIX sockets.
e4ae7eb @miyagawa Initial commit
authored
57
53cca0a @miyagawa Display the master/worker in the process list. Document the memory fo…
authored
58 =item Small memory footprint
59
12ea371 @miyagawa Document preload-app
authored
60 Preloading the applications with C<--preload-app> command line option
61 enables copy-on-write friendly memory management. Also, the minimum
62 memory usage Starman requires for the master process is 7MB and
63 children (workers) is less than 3.0MB.
53cca0a @miyagawa Display the master/worker in the process list. Document the memory fo…
authored
64
e4ae7eb @miyagawa Initial commit
authored
65 =item PSGI compatible
66
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
67 Can run any PSGI applications and frameworks
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
68
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
69 =item HTTP/1.1 support
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
70
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
71 Supports chunked requests and responses, keep-alive and pipeline requests.
700ad42 @miyagawa docs
authored
72
dadd904 @miyagawa Unsupport win32 so i won't receive test failures
authored
73 =item UNIX only
74
75 This server does not support Win32.
76
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
77 =back
78
3d42b4a @miyagawa docs
authored
79 =head1 PERFORMANCE
80
c0f9968 @miyagawa docs
authored
81 Here's a simple benchmark using C<Hello.psgi>.
3d42b4a @miyagawa docs
authored
82
2c4db00 @miyagawa update benchmarks
authored
83 -- server: Starman (workers=10)
84 Requests per second: 6849.16 [#/sec] (mean)
85 -- server: Twiggy
3d42b4a @miyagawa docs
authored
86 Requests per second: 3911.78 [#/sec] (mean)
87 -- server: AnyEvent::HTTPD
88 Requests per second: 2738.49 [#/sec] (mean)
2c4db00 @miyagawa update benchmarks
authored
89 -- server: HTTP::Server::PSGI
90 Requests per second: 2218.16 [#/sec] (mean)
91 -- server: HTTP::Server::PSGI (workers=10)
3d42b4a @miyagawa docs
authored
92 Requests per second: 2792.99 [#/sec] (mean)
93 -- server: HTTP::Server::Simple
94 Requests per second: 1435.50 [#/sec] (mean)
3145c45 @miyagawa fix docs
authored
95 -- server: Corona
3d42b4a @miyagawa docs
authored
96 Requests per second: 2332.00 [#/sec] (mean)
97 -- server: POE
98 Requests per second: 503.59 [#/sec] (mean)
99
c0f9968 @miyagawa docs
authored
100 This benchmark was processed with C<ab -c 10 -t 1 -k> on MacBook Pro
101 13" late 2009 model on Mac OS X 10.6.2 with perl 5.10.0. YMMV.
102
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
103 =head1 NAMING
3d42b4a @miyagawa docs
authored
104
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
105 =head2 Starman?
106
107 The name Starman is taken from the song (I<Star na Otoko>) by the
1132d08 @miyagawa fix pods
authored
108 Japanese rock band Unicorn (yes, Unicorn!). It's also known as a song
109 by David Bowie, a power-up from Super Mario Brothers and a character
110 from Earthbound, all of which I love.
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
111
09c7099 @miyagawa typo
authored
112 =head2 Why the cute name instead of more descriptive namespace? Are you on drugs?
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
113
c0f9968 @miyagawa docs
authored
114 I'm sick of naming Perl software like
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
115 HTTP::Server::PSGI::How::Its::Written::With::What::Module and people
1132d08 @miyagawa fix pods
authored
116 call it HSPHIWWWM on IRC. It's hard to say on speeches and newbies
c0f9968 @miyagawa docs
authored
117 would ask questions what they stand for every day. That's crazy.
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
118
c0f9968 @miyagawa docs
authored
119 This module actually includes the longer alias and an empty subclass
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
120 L<HTTP::Server::PSGI::Net::Server::PreFork> for those who like to type
121 more ::'s. It would actually help you find this software by searching
122 for I<PSGI Server Prefork> on CPAN, which i believe is a good thing.
3d42b4a @miyagawa docs
authored
123
c0f9968 @miyagawa docs
authored
124 Yes, maybe I'm on drugs. We'll see.
125
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
126 =head1 AUTHOR
e4ae7eb @miyagawa Initial commit
authored
127
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
128 Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>
e4ae7eb @miyagawa Initial commit
authored
129
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
130 Andy Grundman wrote L<Catalyst::Engine::HTTP::Prefork>, which this module
131 is heavily based on.
e4ae7eb @miyagawa Initial commit
authored
132
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
133 Kazuho Oku wrote L<Net::Server::SS::PreFork> that makes it easy to add
134 L<Server::Starter> support to this software.
e4ae7eb @miyagawa Initial commit
authored
135
136 =head1 LICENSE
137
138 This library is free software; you can redistribute it and/or modify
139 it under the same terms as Perl itself.
140
141 =head1 SEE ALSO
142
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
143 L<Plack> L<Catalyst::Engine::HTTP::Prefork> L<Net::Server::Prefork>
e4ae7eb @miyagawa Initial commit
authored
144
145 =cut
Something went wrong with that request. Please try again.