NAME
Plack::Handler::Feersum::SS - Server::Starter adapter for Feersum Plack handler
SYNOPSIS
tcp socket:
start_server --signal-on-hup=QUIT --port=5000 -- \
plackup -s Feersum::SS --pre-fork=4 app.psgi
unix socket:
start_server --signal-on-hup=QUIT --path=/tmp/app.sock -- \
plackup -s Feersum::SS --pre-fork=4 app.psgi
multiple ports:
start_server --signal-on-hup=QUIT --port=5000 --port=5001 -- \
plackup -s Feersum::SS app.psgi
tls with http/2:
start_server --signal-on-hup=QUIT --port=8443 -- \
plackup -s Feersum::SS \
--tls-cert-file=server.crt --tls-key-file=server.key --h2=1 app.psgi
DESCRIPTION
Runs Feersum on the listening sockets that Server::Starter hands down, so a HUP to start_server restarts the application gracefully.
Options are plackup --name=value arguments; dashes and underscores are interchangeable. (-o is plackup's short form of --host, not an option flag.) See Feersum and Feersum::Runner for what each one does:
connection keepalive read_timeout header_timeout write_timeout
linger_timeout max_connection_reqs
limits max_connections max_accept_per_loop max_read_buf
max_body_len max_uri_len wbuf_low_water
priorities read_priority write_priority accept_priority
proxy reverse_proxy proxy_protocol psgix_io
tls tls_cert_file tls_key_file h2
max_h2_concurrent_streams max_h2_conn_body
workers pre_fork graceful_timeout max_requests_per_worker
preload_app startup_timeout
privileges user group
Unknown options are reported and ignored.
TLS applies to every Server::Starter port. user and group drop privileges once the sockets are open and TLS is loaded; with pre_fork, respawned workers reload the certificate and key as that user, so both must stay readable by it.
These take code or data references, so they can only be set from Perl, e.g. with Plack::Runner->set_options or as arguments to Plack::Loader->load:
tls { cert_file => $path, key_file => $path, h2 => 1 }
sni [ { sni => $hostname, cert_file => $path, key_file => $path } ]
after_fork sub { ... }
access_log sub { my ($method, $uri, $elapsed) = @_; ... }
daemonize (plackup -D), hot_restart, pid_file, reuseport and backlog are refused: start_server owns the sockets and the process (see its --daemonize, --pid-file and --backlog).
SEE ALSO
Feersum, Feersum::Runner, Server::Starter, Plack
AUTHOR
Yegor Korablev <egor@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by Yegor Korablev.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.