yahns.git  about / heads / tags
sleepy, multi-threaded, non-blocking application server for Ruby
$ git log --pretty=format:'%h %s (%cs)%d' v1.2.0 --
4b8a59a yahns 1.2.0 - preliminary kqueue/FreeBSD support (2014-03-15)
	(tag: v1.2.0)
7dd232e minor style fix for consistency (2014-03-15)
ade89b5 wbuf: hack to avoid response corruption on FreeBSD (2014-03-15)
f6d86ef test/helper: compat w/ coverage in Feature #9508 (2014-03-13)
c28223d Merge remote-tracking branch 'origin/freebsd' (2014-03-13)
e59f1c0 gemspec: switch to kgio-sendfile for ruby-trunk compat (2014-03-13)
f46aea4 implement kqueue and sendfile compatibility support (2014-02-08)
922e714 test: log skipped tests on non-Linux systems (2014-02-08)
2f7660e test_server: check_client_connection uses Unix sockets (2014-02-08)
e86802a test_client_expire: add delays for non-Linux OSes (2014-02-08)
...

$ git cat-file blob v1.2.0:README
yahns - sleepy, multi-threaded, non-blocking application server for Ruby
------------------------------------------------------------------------

A Free Software, multi-threaded, non-blocking network application server
designed for low _idle_ power consumption.  It is primarily optimized
for applications with occasional users which see little or no traffic.
yahns currently hosts Rack/HTTP applications, but may eventually support
other application types.  Unlike some existing servers, yahns is
extremely sensitive to fatal bugs in the applications it hosts.

Features
--------

* _zero_ wakeups when all clients are idle
* idle client connections may live forever if there is no FD pressure
* suitable for slow clients, fast clients, or a mixture of both
* HTTP/0.9 support
* HTTP/1.1 persistent connections and pipelining
* decodes HTTP chunked encoding for requests
* parses HTTP/1.1 trailers in requests
* supports streaming responses with lazy buffering for slow clients
* optional streaming input for fast clients
* able to host multiple applications with different settings
* uses epoll to scale to many idle connections
* abuses epoll as a load balancer between threads inside a process
* optional multi-process support (in addition to threads)
* fairly balances new clients between multiple processes (on Linux)

Disclaimer
----------

yahns is extremely sensitive to fatal bugs in the apps it hosts.  There
is no (and never will be) any built-in "watchdog"-type feature to kill
stuck processes/threads.  Each yahns process may be handling thousands
of clients; unexpectedly killing the process will abort _all_ of those
connections.  Lives may be lost!

yahns hackers are not responsible for your application/library bugs.
Use an application server which is tolerant of buggy applications
if you cannot be bothered to fix all your fatal bugs.

Supported Platforms
-------------------

yahns is developed primarily for modern GNU/Linux systems.

We have experimental support kqueue on FreeBSD (and possibly OpenBSD and
NetBSD).  Non-Free systems/dependencies will never be supported.

Supported Ruby implementations:
* (Matz) Ruby 1.9.3 and later (we develop (and host our website) on trunk)
* Rubinius 2.0 or later (best-effort)

Contact
-------

We are happy to see feedback of all types via plain-text email.
Please send comments, user/dev discussion, patches, bug reports,
and pull requests to the public mailing list at:

	yahns-public@rubyforge.org

No subscription is necessary to post.  Please Cc: all recipients as
subscription is not necessary.

You may subscribe by sending a request to:

	yahns-public-request@rubyforge.org
	with the Subject line: "subscribe"

This README is our homepage, we would rather be working on HTTP servers
all day than worrying about the next browser vulnerability because
HTML/CSS/JS is too complicated for us.

* http://yahns.yhbt.net/README

Hacking
-------

We use git and follow the same development model as git itself
(mailing list-oriented, benevolent dictator).

  git clone git://yhbt.net/yahns

Please use git-format-patch(1) and git-send-email(1) distributed with
the git(7) suite for generating and sending patches.  Please format
pull requests with the git-request-pull(1) script (also distributed
with git(7)) and send them via email.

See http://www.git-scm.com/ for more information on git.

Design
------

yahns is designed to optimimally use multiple threads with non-blocking I/O.
The event loop is not a traditional single-threaded design with a mutex
slapped on as an afterthought, but designed from the beginning to utilize
multiple threads.

* two classes of long-lived, persistent threads
  1. blocking acceptors
  2. non-blocking event loop workers
* epoll acts as a queue (by using one-shot notifications)
* acceptors accept new clients and put them in the epoll "queue"
* workers pull clients off the queue, rearming them to epoll on EAGAIN

The end result is clients transition freely and fairly between threads
and will always be able to find the next idle thread to run on.

This design works with kqueue, too, and we will support kqueue if there
is interest.  In fact, got our design inspiration from the name "kqueue"
when working on another project.  We may also support libkqueue:

    http://sourceforge.net/projects/libkqueue/

In addition to multiple threads, yahns optionally supports multiple
processes to work around low FD limits as well as contention in the:

* kernel (socket (de)allocation from accept/close)
* standard C library (malloc/free)
* Ruby VM (GVL, GC)
* application it hosts

Copyright
---------

Copyright 2013, Eric Wong <normalperson@yhbt.net> and all contributors.
License: GPLv3 or later <https://www.gnu.org/licenses/gpl-3.0.txt>

yahns is copyrighted Free Software by all contributors, see logs in
revision control for names and email addresses of all of them.  yahns
contains code from Mongrel, unicorn, and Rainbows! which may also be
licensed under the GPLv2 or later.

yahns is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

yahns is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see https://www.gnu.org/licenses/gpl-3.0.txt

lrg nabgure ubeevoyl-anzrq freire :>

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       test/test_extras_exec_cgi: drop Rack::ContentLength (2022-12-25)
  remove-kgio  drop writev support (2017-03-06)
  autochunk    Revert "document Rack::Chunked/ContentLength semi-requirements" (2016-08-03)
  maint        yahns 1.12.5 - proxy_pass + rack.hijack fixes (2016-06-05)
  ruby-accept_moving_write_buffer ssl: disable copying for writes (2016-03-01)
  opt-case     rely on optimized case dispatch (2015-12-08)
  the_metal    the_metal: fix typo in buffer creation (2014-08-27)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v1.18.0      yahns 1.18.0 (2021-10-09) tar.gz
v1.17.0      yahns 1.17.0 - Earth Day release (2019-04-22) tar.gz
v1.16.0      yahns 1.16.0 (2018-08-06) tar.gz
v1.15.0      yahns 1.15.0 (2017-03-23) tar.gz
v1.14.1      yahns 1.14.1 - bugfixes only (2016-12-14) tar.gz
v1.14.0      yahns 1.14.0 - removing undefined behavior (2016-11-14) tar.gz
v1.13.0      yahns 1.13.0 - some user-visible improvements... (2016-08-05) tar.gz
v1.12.5      yahns 1.12.5 - proxy_pass + rack.hijack fixes (2016-06-05) tar.gz
v1.12.4      yahns 1.12.4 - rack.hijack and proxy_pass bugfixes (2016-05-02) tar.gz
v1.12.3      yahns 1.12.3 - more fixes and doc updates (2016-04-08) tar.gz
...

# associated public inboxes:
# (number on the left is used for dev purposes)
            https://yhbt.net/yahns-public

git clone git://yhbt.net/yahns.git
git clone https://yhbt.net/yahns.git