Skip to content

Kino 0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Aug 14:07
  • Rack handler: rails server -u kino and rackup -s kino boot Kino
    through Rackup::Handler::Kino, reading the same config file as the
    kino CLI with the host's flags on top; rackup -s kino --help lists
    the -O options (Workers, Threads, Mode, Config).
  • The config file is also looked up at config/kino.rb (the Rails
    layout) when there is no kino.rb, by the CLI and the handler alike.
  • Kino::Server#run serves an already built server the way
    Kino::Server.run does (banner, signal traps, block until shutdown),
    and syncs stdout there so the banner is never held back by block
    buffering under a pipe, whichever entry point booted the server.
  • workers now defaults to Kino.available_parallelism, the CPUs the
    process may actually use: the affinity mask and, in a container, the
    cgroup CPU quota (a pod limited to 2 CPUs on a 64-core node gets 2
    workers, not 64). Etc.nprocessors only ever saw the mask.
  • bind "unix:///path/to.sock" listens on a unix domain socket, the
    usual shape behind nginx: a stale socket file is reclaimed, a live one
    is refused, and the file is removed on shutdown. port is unused on
    it and TLS is rejected (terminate TLS at the proxy). Requests arriving
    over the socket report REMOTE_ADDR 127.0.0.1.
  • Kino::Server#url, #control_url, and #unix? report where a started
    server and its control plane listen.
  • The access log is two records per request: an arrival line queued
    before the app runs (a hang shows as an arrow with no answer) and a
    status-tinted completion line with a timing breakdown of ruby,
    kino, and wait, the ruby part carrying the GC pause and objects
    allocated where one request at a time can own the VM's counters
    (:threaded, or :ractor with workers 1). Local timestamps with
    their UTC offset; a blank line between requests. The former one-line
    format is gone.
  • A failed request is reported as 500 GET /path · Class: message (site)
    followed by its backtrace relative to the working directory, the app's
    own frames first, the rest folded into … N more.
  • Every line Kino logs about itself (draining, a crash and its respawn,
    hook failures, quarantine, the USR1 stats line, rack.errors) reads
    kino[<pid>] <source>: message, the source naming the worker that
    spoke (worker-3, worker-3/thread-2) or main; worker ractors and
    threads now carry those names. The label is dim, yellow, or red by
    level on color terminals. Kino::Log.info, .warn, and .error are
    public, for hooks.
  • The startup banner lists the Ruby build with its JIT and parser flags,
    the environment, the topology, the pid, and the control-plane address
    when one is bound.