Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 137 lines (88 sloc) 3.572 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;
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
16 Starman - High-performance preforking PSGI 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
9b2c592 @miyagawa rename Nomo to Starman, while respecting the CPANism to prefix
authored
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
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
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
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 footp...
authored
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
61 management. Also, the minimum memory usage Starman requires for the
53cca0a @miyagawa Display the master/worker in the process list. Document the memory footp...
authored
62 master process is 7MB and children (workers) is less than 3.0MB.
63
e4ae7eb @miyagawa Initial commit
authored
64 =item PSGI compatible
65
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
66 Can run any PSGI applications and frameworks
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
67
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
68 =item HTTP/1.1 support
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
69
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
70 Supports chunked requests and responses, keep-alive and pipeline requests.
700ad42 @miyagawa docs
authored
71
3cc0590 @miyagawa Added ControlFreak support. Reworked wrapper/chain callback interface.
authored
72 =back
73
3d42b4a @miyagawa docs
authored
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
79 -- server: Starman
e40c242 @miyagawa use HTTP::Parser::XS for the additional speedups.
authored
80 Requests per second: 6413.87 [#/sec] (mean)
3d42b4a @miyagawa docs
authored
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
96 =head1 NAMING
3d42b4a @miyagawa docs
authored
97
f165d4d @miyagawa rename the module to top-level namespace. See =head1 NAMING for details.
authored
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
104 =head2 Why the cute name instead of being more descriptive namespace? Are you on drugs?
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
109 call it HSSPHIWWWM on IRC, and newbies would ask questinos what they
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
116
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
117 =head1 AUTHOR
e4ae7eb @miyagawa Initial commit
authored
118
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
119 Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt>
e4ae7eb @miyagawa Initial commit
authored
120
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
121 Andy Grundman wrote L<Catalyst::Engine::HTTP::Prefork>, which this module
122 is heavily based on.
e4ae7eb @miyagawa Initial commit
authored
123
f8bdf60 @miyagawa Rewrote Nomo using Catalyst::Engine::HTTP::Prefork as a base code.
authored
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
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
134 L<Plack> L<Catalyst::Engine::HTTP::Prefork> L<Net::Server::Prefork>
e4ae7eb @miyagawa Initial commit
authored
135
136 =cut
Something went wrong with that request. Please try again.