Skip to content
Newer
Older
100644 137 lines (88 sloc) 3.48 KB
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored Feb 11, 2010
1 package Starman;
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
2
3 use strict;
4 use 5.008_001;
5 our $VERSION = '0.01';
6
7 1;
8 __END__
9
10 =encoding utf-8
11
12 =for stopwords
13
14 =head1 NAME
15
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored Feb 11, 2010
16 Starman - High-performance preforking PSGI web server
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
17
18 =head1 SYNOPSIS
19
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
20 # Run app.psgi with the default settings
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 10, 2010
21 > starman
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
22
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
23 # run with Server::Starter
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
24 > start_server --port 127.0.0.1:80 -- starman --max-servers 32 myapp.psgi
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
25
26 # UNIX domain sockets
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
27 > starman --listen /tmp/starman.sock
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
28
29 =head1 DESCRIPTION
30
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
31 Starman is a PSGI perl web server that has unique features such as:
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
32
33 =over 4
34
35 =item High Performance
36
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
37 Uses the fast XS/C HTTP header parser
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
38
39 =item Preforking
40
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored Feb 10, 2010
41 Spawns workers preforked like most high performance UNIX servers
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
42 do. Starman also reaps dead children and automatically restarts the
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored Feb 10, 2010
43 worker pool.
44
45 =item Signals
46
47 Supports C<HUP> for graceful restarts, and C<TTIN>/C<TTOU> to
48 dynamically increase or decrease the number of worker processes.
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
49
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
50 =item Superdaemon aware
51
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
52 Supports L<Server::Starter> for hot deploy and graceful restarts.
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
53
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored Feb 10, 2010
54 =item Multiple interfaces and UNIX Domain Socket support
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
55
fcd26ee @miyagawa document signals. Enable graceful restart by default
authored Feb 10, 2010
56 Able to listen on multiple intefaces including UNIX sockets.
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
57
53cca0a @miyagawa Display the master/worker in the process list. Document the memory fo…
authored Feb 10, 2010
58 =item Small memory footprint
59
60 Preloading the applications enables copy-on-write friendly memory
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
61 management. Also, the minimum memory usage Starman requires for the
53cca0a @miyagawa Display the master/worker in the process list. Document the memory fo…
authored Feb 10, 2010
62 master process is 7MB and children (workers) is less than 3.0MB.
63
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
64 =item PSGI compatible
65
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
66 Can run any PSGI applications and frameworks
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
67
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
68 =item HTTP/1.1 support
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
69
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
70 Supports chunked requests and responses, keep-alive and pipeline requests.
700ad42 @miyagawa docs
authored Jan 12, 2010
71
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored Jan 12, 2010
72 =back
73
3d42b4a @miyagawa docs
authored Feb 9, 2010
74 =head1 PERFORMANCE
75
76 A simple benchmark using C<Hello.psgi> as of Plack git SHA I<82121a>
77 with ApacheBench concurrenty 10 and Keep-alive on.
78
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored Feb 11, 2010
79 -- server: Starman
e40c242 @miyagawa use HTTP::Parser::XS for the additional speedups.
authored Feb 9, 2010
80 Requests per second: 6413.87 [#/sec] (mean)
3d42b4a @miyagawa docs
authored Feb 9, 2010
81 -- server: AnyEvent
82 Requests per second: 3911.78 [#/sec] (mean)
83 -- server: AnyEvent::HTTPD
84 Requests per second: 2738.49 [#/sec] (mean)
85 -- server: Standalone
86 Requests per second: 1045.66 [#/sec] (mean)
87 -- server: Standalone (prefork)
88 Requests per second: 2792.99 [#/sec] (mean)
89 -- server: HTTP::Server::Simple
90 Requests per second: 1435.50 [#/sec] (mean)
91 -- server: Coro
92 Requests per second: 2332.00 [#/sec] (mean)
93 -- server: POE
94 Requests per second: 503.59 [#/sec] (mean)
95
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored Feb 11, 2010
96 =head1 NAMING
3d42b4a @miyagawa docs
authored Feb 9, 2010
97
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored Feb 11, 2010
98 =head2 Starman?
99
100 The name Starman is taken from the song (I<Star na Otoko>) by the
101 Japanese rock band Unicorn. It's also a power-up from Super Mario
102 Brothers and a character from the video game Earthbound.
103
09c7099 @miyagawa typo
authored Feb 11, 2010
104 =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 Feb 11, 2010
105
106 Maybe I am on drugs with all those Ruby cute names but I'm sick of
107 naming software like
108 HTTP::Server::PSGI::How::Its::Written::With::What::Module and people
09c7099 @miyagawa typo
authored Feb 11, 2010
109 call it HSSPHIWWWM on IRC, and newbies would ask questions what they
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored Feb 11, 2010
110 stand for every day. That's crazy.
111
112 This module actually includes the longer alias
113 L<HTTP::Server::PSGI::Net::Server::PreFork> for those who like to type
114 more ::'s. It would actually help you find this software by searching
115 for I<PSGI Server Prefork> on CPAN, which i believe is a good thing.
3d42b4a @miyagawa docs
authored Feb 9, 2010
116
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
117 =head1 AUTHOR
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
118
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
119 Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
120
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
121 Andy Grundman wrote L<Catalyst::Engine::HTTP::Prefork>, which this module
122 is heavily based on.
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
123
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
124 Kazuho Oku wrote L<Net::Server::SS::PreFork> that makes it easy to add
125 L<Server::Starter> support to this software.
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
126
127 =head1 LICENSE
128
129 This library is free software; you can redistribute it and/or modify
130 it under the same terms as Perl itself.
131
132 =head1 SEE ALSO
133
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored Feb 9, 2010
134 L<Plack> L<Catalyst::Engine::HTTP::Prefork> L<Net::Server::Prefork>
e4ae7eb @miyagawa Initial commit
authored Jan 12, 2010
135
136 =cut
Something went wrong with that request. Please try again.