yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: yahns-public@yhbt.net
Subject: [PATCH 0/3] towards becoming a fully-buffering reverse proxy
Date: Sat, 14 Mar 2015 03:17:55 +0000	[thread overview]
Message-ID: <1426303078-4525-1-git-send-email-e@80x24.org> (raw)

The goal is to allow yahns to become an alternative to nginx for
users running pre-forking HTTP application servers.  Some users
are uncomfortable with the commercialized, "open core" nature of
nginx nowadays and would rather use a non-commercial server.

Technically all the pieces are already in place with the buffering
defaults provided by yahns.  But the main concern is the 1:1
(yahns)thread:upstream-connection relationship being a waste of system
resources compared to the 1:M relationship which is ideal.  So the goal
is to eliminate that for large setups and many upstream processes.

Under most conditions, nginx will always offer better performance
and lower memory usage than yahns.  However, yahns currently has
some minor advantages:

1) yahns does _lazy_ output buffering, allowing lower latency to the
   first part of a large response.

2) the one-shot, one-event-per-thread-based model provides better
   worst-case behavior when serving large files off slow disks
   by reducing head-of-line blocking due to slow disk reads.

Furthermore, relying on Ruby in yahns may allow users to migrate
thread-safe endpoints of an Rack app directly into yahns, while
relying on Yahns::ProxyPass to forward non-thread-safe endpoints
to a single-threaded server.

(*) Sure, many folks are also uncomfortable with me being a
    Free Software extremist, too, but that's *their* problem :P

             reply	other threads:[~2015-03-14  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14  3:17 Eric Wong [this message]
2015-03-14  3:17 ` [PATCH 1/3] extras/proxy_pass: implicit $fullpath expansion for upstreams Eric Wong
2015-03-14  3:17 ` [PATCH 2/3] extras/proxy_pass: support Unix domain sockets as backends Eric Wong
2015-03-14  3:17 ` [PATCH 3/3] proxy_pass: officially become a part of yahns Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426303078-4525-1-git-send-email-e@80x24.org \
    --to=e@80x24.org \
    --cc=yahns-public@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).