This is the primary (if not the only) reason why I wrote Gepok, and why it uses HTTP::Daemon::* family (because there is HTTP::Daemon::SSL). I needed a pure-Perl standalone webserver with SSL support builtin. Other Perl servers usually recommend running behind Nginx or some other external HTTPS proxy.

A 2-element arrayref (produced by Time::HiRes' gettimeofday()), clocked right after Gepok has received the complete request from client.

gepok.client_protocol => STR

HTTP protocol version sent by client, e.g. "HTTP/1.0" or "HTTP/1.1". This can be used to avoid sending HTTP/1.1 response to HTTP/1.0 or older clients.

gepok.socket => OBJ

Raw HTTP::Daemon::ClientConn socket. Can be used to get information about socket, e.g. peerport(), etc. Should not be used to read/write data (use PSGI way for that, e.g. $env->{'psgi.input'}, returning PSGI response, etc).

gepok.httpd_socket => OBJ

Raw HTTP::Daemon socket. Can be used to get information about socket, e.g. peercred() (for UNIX sockets), etc. Should not be used to return HTTP response directly (use PSGI way for that).

gepok.unix_socket => BOOL

A boolean value which is set to true if client connects via Unix socket. (Note, you can get Unix socket path from $env->{SERVER_NAME} or $env->{'gepok.socket'}).

One or more HTTP ports to listen to. Default is none. Each port can be in the form of N, ":N", "0.0.0.0:N" (all means the same thing, to bind to all interfaces) or "1.2.3.4:N" (to bind to a specific network interface).

Location of scoreboard file (used for communication between parent and child processes). If you disable this, autoadjusting number of children won't work (number of children will be kept at 'start_servers').

This is a hook provided for subclasses to do something before the daemon is preforking. For example, you can preload Perl modules here so that each child doesn't have to load modules separately (= inefficient).

The main feature for Gepok is builtin HTTPS support, which means you do not have to setup a separate front-end HTTPS proxy for serving content over HTTPS. This is convenient, especially for development. Builtin HTTPS support also makes some things easier to, e.g. check client certificates you can use the ssl_verify_callback options. Your PSGI application also has direct access to the raw socket ($env->{'gepok.socket'}).

However, for heavy traffic use, you might want to check out more battle-tested solution like Perlbal.

There are now other PSGI servers that support HTTPS, see the SEE ALSO section.

I personally developed Gepok for two reasons: HTTPS support and listening on Unix sockets.

Thanks to preforking, Gepok has adequate performance and reliability handling multiple clients. But Gepok is not yet performance-tuned, or very performance-oriented to begin with. For convenience Gepok is based on HTTP::Daemon, which is also not too performance-oriented. For each HTTP request, HTTP::Daemon constructs an HTTP::Request object, which copies request body into a scalar (and, for PSGI, needs to be re-presented as a stream using IO::Scalar). Creating other objects like URI and HTTP::Headers are also involved. Gepok also creates file-based scoreboard, which might or might not be a bottleneck.

Casual benchmarking on my PC shows that Gepok is about 3-4x slower than Starman for "hello world" PSGI.