Starlet(3pm)
π Starlet π
okay bestie, gather round, because we're talking about Starlet, the Perl module also known as Starlet(3pm) β and she is that girl. A simple, high-performance PSGI/Plack HTTP server. no cap. π
β¨ SYNOPSIS β¨
you wanna run it with hot deploy? say less:
% start_server --port=80 -- plackup -s Starlet [options] your-app.psgi
or, if you do not need hot deploy (and honestly, same):
% plackup -s Starlet --port=80 [options] your-app.psgi
πΈ DESCRIPTION πΈ
so Starlet is a standalone HTTP/1.1 web server, and she's got a whole glow-up history β she was formerly known as Plack::Server::Standalone::Prefork and Plack::Server::Standalone::Prefork::Server::Starter. iconic rebrand honestly. π
the server supports following features, and is suitable for running HTTP application servers behind a reverse proxy:
- prefork and graceful shutdown using
Parallel::Prefork - hot deploy using
Server::Starter - fast HTTP processing using
HTTP::Parser::XS(optional)
like... the range. π
π COMMAND LINE OPTIONS π
in addition to the options supported by plackup, Starlet accepts following options(s). yes bestie, extra options, we love that for us.
--max-workers=#β number of worker processes (default:10)--timeout=#β seconds until timeout (default:300)--keepalive-timeout=#β timeout for persistent connections (default:2)--max-keepalive-reqs=#β max. number of requests allowed per single persistent connection. If set to one, persistent connections are disabled (default:1)--max-reqs-per-child=#β max. number of requests to be handled before a worker process exits (default:100)--min-reqs-per-child=#β if set, randomizes the number of requests handled by a single worker process between the value and that supplied by--max-reqs-per-chlid(default:none)--spawn-interval=#β if set, worker processes will not be spawned more than once than every given seconds. Also, whenSIGHUPis being received, no more than one worker processes will be collected every given seconds. This feature is useful for doing a "slow-restart". Seehttp://blog.kazuhooku.com/2011/04/web-serverstarter-parallelprefork.htmlfor more information. (default:none)--child-exit=sβ the subroutine code to be executed right before a child process exits. e.g.--child-exit='sub { POSIX::_exit(0) }'. (default:none)
π¦ Extensions to PSGI π¦
psgix.informational
Starlets exposes a callback named psgix.informational 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.
sub {
my $env = shift;
$env["psgix.informational"}->(103, [
'link' => '</style.css>; rel=preload'
]);
my $resp = ... application logic ...
$resp;
}
π NOTES π
Starlet is designed and implemented to be simple, secure and fast, especially for running as an HTTP application server running behind a reverse proxy. she only depends on a minimal number of well-designed (and well-focused) modules. lowkey minimalism is the moment. π§
π SEE ALSO π
Parallel::Prefork Starman Server::Starter
π AUTHOR π
Kazuho Oku
miyagawa
kazeburo
Tomohiro Takezawa
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
and that's the whole vibe check bestie π«Ά this page was brought to you by perl v5.40.1, dated 2026-06-13, and she ate. periodt. π
β¨π
π¦ where this page comes from
- ubuntu stonking: starlet 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms