.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Starlet 3pm" .TH Starlet 3pm "2022-06-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Starlet \- a simple, high\-performance PSGI/Plack HTTP server .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& % start_server \-\-port=80 \-\- plackup \-s Starlet [options] your\-app.psgi \& \& or if you do not need hot deploy, \& \& % plackup \-s Starlet \-\-port=80 [options] your\-app.psgi .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Starlet is a standalone \s-1HTTP/1.1\s0 web server, formerly known as Plack::Server::Standalone::Prefork and Plack::Server::Standalone::Prefork::Server::Starter. .PP The server supports following features, and is suitable for running \s-1HTTP\s0 application servers behind a reverse proxy. .PP \&\- prefork and graceful shutdown using Parallel::Prefork .PP \&\- hot deploy using Server::Starter .PP \&\- fast \s-1HTTP\s0 processing using HTTP::Parser::XS (optional) .SH "COMMAND LINE OPTIONS" .IX Header "COMMAND LINE OPTIONS" In addition to the options supported by plackup, Starlet accepts following options(s). .SS "\-\-max\-workers=#" .IX Subsection "--max-workers=#" number of worker processes (default: 10) .SS "\-\-timeout=#" .IX Subsection "--timeout=#" seconds until timeout (default: 300) .SS "\-\-keepalive\-timeout=#" .IX Subsection "--keepalive-timeout=#" timeout for persistent connections (default: 2) .SS "\-\-max\-keepalive\-reqs=#" .IX Subsection "--max-keepalive-reqs=#" max. number of requests allowed per single persistent connection. If set to one, persistent connections are disabled (default: 1) .SS "\-\-max\-reqs\-per\-child=#" .IX Subsection "--max-reqs-per-child=#" max. number of requests to be handled before a worker process exits (default: 100) .SS "\-\-min\-reqs\-per\-child=#" .IX Subsection "--min-reqs-per-child=#" if set, randomizes the number of requests handled by a single worker process between the value and that supplied by \f(CW\*(C`\-\-max\-reqs\-per\-chlid\*(C'\fR (default: none) .SS "\-\-spawn\-interval=#" .IX Subsection "--spawn-interval=#" if set, worker processes will not be spawned more than once than every given seconds. Also, when \s-1SIGHUP\s0 is being received, no more than one worker processes will be collected every given seconds. This feature is useful for doing a \*(L"slow-restart\*(R". See http://blog.kazuhooku.com/2011/04/web\-serverstarter\-parallelprefork.html for more information. (default: none) .SS "\-\-child\-exit=s" .IX Subsection "--child-exit=s" the subroutine code to be executed right before a child process exits. e.g. \f(CW\*(C`\-\-child\-exit=\*(Aqsub { POSIX::_exit(0) }\*(Aq\*(C'\fR. (default: none) .SH "Extensions to PSGI" .IX Header "Extensions to PSGI" .SS "psgix.informational" .IX Subsection "psgix.informational" Starlets exposes a callback named \f(CW\*(C`psgix.informational\*(C'\fR that can be used for sending an informational response. The callback accepts two arguments, the first argument being the status code and the second being an arrayref of the headers to be sent. Example below sends an 103 response before processing the request to build a final response. .PP .Vb 8 \& sub { \& my $env = shift; \& $env["psgix.informational"}\->(103, [ \& \*(Aqlink\*(Aq => \*(Aq; rel=preload\*(Aq \& ]); \& my $resp = ... application logic ... \& $resp; \& } .Ve .SH "NOTES" .IX Header "NOTES" Starlet is designed and implemented to be simple, secure and fast, especially for running as an \s-1HTTP\s0 application server running behind a reverse proxy. It only depends on a minimal number of well-designed (and well-focused) modules. .SH "SEE ALSO" .IX Header "SEE ALSO" Parallel::Prefork Starman Server::Starter .SH "AUTHOR" .IX Header "AUTHOR" Kazuho Oku .PP miyagawa .PP kazeburo .PP Tomohiro Takezawa .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See