about summary refs log tree commit homepage
path: root/Documentation
DateCommit message (Collapse)
2016-09-26move website to https://yhbt.net/yahns/
HTTPS adds some level of privacy protection and helps marketing (because we care soooo much about good marketing! :P). Performance-wise, this reduces subjectAltName bloat when negotiating connections and will also speed up occasional certificate renewals when/if we drop the old name. Also, not occupying the document root of a domain will make it easier to add alternative site locations in the future, because centralization sucks and I don't like the idea of anybody paying ICANN or similar entities for domain names.
2016-08-03Revert "document Rack::Chunked/ContentLength semi-requirements" autochunk
Actually, I guess I misread, rack (starting at) 1.0 stopped requiring Content-Length/Chunked headers but I never noticed. Oh well. This reverts commit 4968041a7e1ff90b920704f50fccb9e7968d0d99.
2016-08-02doc: add session cache usage to OpenSSL example
Sometimes, one process is all you need :> Fwiw, I am also experimenting with the following in my yahns.conf.rb file: scache_stats = lambda do |env| s = ctx.session_cache_stats.inspect << "\n" [200, [%W(Content-Length #{s.size}), %w(Content-Type text/plain)], [s]] end app(:rack, scache_stats, preload: true) do listen "unix:/tmp/yahns-scache.#$$.sock" end Which allows me to get stats based on the master PID (not worker): printf 'GET / HTTP/1.0\r\n\r\n' | socat - UNIX:/tmp/yahns-scache.$PID.sock
2016-04-29document Rack::Chunked/ContentLength semi-requirements
Ugh, it sucks that other servers are so tolerant of violations of the Rack spec. Rainbows! had the same problem: https://bogomips.org/rainbows-public/20140704195032.GA13152@dcvr.yhbt.net/
2016-04-06doc: recommend "verify_mode: OpenSSL::SSL::VERIFY_NONE"
The Ruby default parameters on top of OpenSSL seem designed for client usage. For server usage, requiring client-side certificate verification is uncommon for HTTPS sites. So follow what WEBrick does for HTTPS and use SSL_VERIFY_NONE in our documentation. Thanks-to: Shota Fukumori (sora_h) <her@sorah.jp> on the unicorn list: <CA+wiQwuE=ya6F4s4k3GCTUppk7mbBOYOVwVXhTsX2SP8mgdmNQ@mail.gmail.com>
2016-03-01yahns 1.12.2 - minor doc and TLS fixes v1.12.2
This release ensures OpenSSL::SSL::SSLContext#session_id_context is always set for OpenSSL users. It won't overwrite existing settings, but setting it to a random value is necessary to ensure clients do not get aborted connections when attempting to use a session cache. No need to actually upgrade if you're on 1.12.1, you may add the following to your yahns_config(5) file where OpenSSL::SSL::SSLContext is configured: # recommended, not required. This sets safer defaults # provided by Ruby on top of what OpenSSL gives: ssl_ctx.set_params # required, and done by default in v1.12.2: ssl_ctx.session_id_context ||= OpenSSL::Random.random_bytes(32) yahns gives you full control of of how OpenSSL::SSL::SSLContext is configured. To avoid bugs, yahns only ensures OpenSSL::SSL::SSLContext#session_id_context is set (if not previously set by the user) and calls OpenSSL::SSL::SSLContext#setup before spawning threads to avoid race conditions. yahns itself does not and will not enforce any opinion on the compatibility/performance/security trade-offs regarding TLS configuration. Note: keep in mind using an SSL session cache may be less useful with yahns because HTTP/1.1 persistent connections may live forever :) 3 bug/doc fixes on top of v1.12.1: document OpenSSL::SSL::SSLContext#set_params use ssl: ensure is session_id_context is always set test/*: fix mktmpdir usage for 1.9.3
2016-02-29document SSL::SSL::SSLContext#set_params use
I use whatever Ruby developers deem to be reasonable defaults. Because compatibility with old systems is still valued, these may not be the safest possible configuration; but ought to be better than what OpenSSL upstream provides by default.
2016-02-22doc: more minor updates
Remove all pandoc references. We shouldn't need to clutter our documentation with out-of-date references to pandoc, and pod2man is probably widely-available enough that nobody should need to install it. Reduce HTTP redirects when linking to external sites. It's also excessive to mention libkqueue as using the native implementation (whether it be kqueue or epoll) is preferred and easier.
2016-02-21doc: mention kqueue/kevent alongside epoll
epoll and kqueue are similar and we use them in a similar way; so mention kqueue alongside epoll for users who may already be familiar with kqueue on *BSD but not epoll under Linux. epoll is a queue, too!
2016-02-14doc: various doc and linkification improvements
Correctly link to subsections within the same page, and include a link to mailing list archives. Also, use "ssl_ctx" consistently as a local variable as we internally use "ctx" for other purposes.
2016-02-14doc: document ssl_ctx for "listen" directive
With the advent of Let's Encrypt, we'll see more users interested in using yahns with OpenSSL support. So document how a listener may be passed an SSLContext.
2016-02-14doc: trim down documentation slightly
The "threads:" option for the "listen" directive is worthless. Having a dedicated thread per-process is already more than enough (and ideal) for a multi-process setup. Multiple acceptor threads is still wrong for a single-process setup (even if we did not have a GVL) as it still incurs contention with the worker pool within the kernel. So remove the documentation regarding "listen ... threads: ", for now; at least until somebody can prove it's useful and not taking up space. Additionally, "atfork_parent" may be useful for restarting background threads/connections if somebody wants to run background jobs in the master process, so stop saying it's completely useless.
2016-02-14doc: switch to perlpod (from pandoc-flavored Markdown)
pod2man(1) and pod2text(1) are already installed on most modern GNU/Linix systems including Debian and RedHat-based systems; pandoc(1) and Haskell are not, and we do not wish to waste precious bandwidth and disk space of potential packagers. perlpod(1) is also better standardized than any Markdown flavor, especially when it comes to generating manpages. Finally, I'm mildly proficient at Perl (it is similar to Ruby) and can poke around at the source if I encounter breakage.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2015-12-04doc: document and reference sd_listen_fds(3) behavior
Users tend to skip reading release notes, ensure the manpage documents this feature.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-04-01doc: note possible removal of client_body_buffer_size
This is probably the least useful tuning knob and may be removed in the future; so at least warn users about it. ref: <CAA2_N1t_UJZO9Vu9vx3NxysCx+okip8_pM+NpwhHrExM+f1e+Q@mail.gmail.com>
2015-01-14doc: add design_notes document
I actually forgot we have the part where we yield a client at the end of every HTTP/1.x request. This hurts cache CPU cache locality, but I bet there's other things in Ruby which destroy CPU cache locality much more than this. Hopefully we don't forget this stuff for HTTP/2, because concurrency for that is so tricky with muliplexed connections!
2014-05-09update documentation to reflect public-inbox/list
Rubyforge is going away on May 15, so update our docs for it.
2013-11-07doc: caution users against disabling buffering
Users may be tempted to disable buffering because it improves synthetic benchmark performance. Synthetic benchmarks are just that and not indicative of what evil (or really crippled) clients can do to a server.
2013-11-07doc: recommend worker_processes if the app uses SIGCHLD
If worker_processes are not enabled, our SIGCHLD handler may conflict with one installed by the application. Fortunately it is uncommon in Ruby web apps to rely on SIGCHLD, but it happens and that is bad.
2013-11-01input and output buffers support tmpdir: arguments
This allows users to specify alternative temporary directories in case buffers get too large for one filesystem to handle or to give priority to some clients on certain ports.
2013-10-31yahns-rackup launcher
This should make it easier for Rack users to get started with yahns.
2013-10-31doc: disambiguate threads: option for listen directive
Users unfamiliar with the design may be confused by the fact there are two types of thread pools in a yahns process.
2013-10-31allow atfork_* hooks inside app blocks for ease-of-management
This should allow users to more-easily enable/disable apps and their dependent atfork_* hooks.
2013-10-31implement before_exec hook
This allows modifying the command-line (as an array) passed to Kernel#exec, as well as running anything necessary.
2013-10-31doc: fix client_timeout documentation in yahns_config
The default value was incorrect, also expand on common reasons why it should be tweaked.
2013-10-31implement shutdown_timeout and expiry on graceful shutdown
Otherwise, the server may stay running forever if a client chooses to stay forever (and there is no FD pressure).
2013-10-30allow multiple blocking threads per listen socket
This is probably not needed and just adds contention, but it makes experimenting easier. While we're at it, validate minimum values of for sndbuf/rcvbuf along with this new threads value, too.
2013-10-29gem: install manpages in the RubyGems package
This should be compatible with the "gem-man" command.
2013-10-29lower client_body_buffer_size to 8K (from 114K)
8K is the default for nginx, too. This prevents Ruby/malloc from getting too fragmented with large buffers and being unable to release memory back to the OS. While we're at it, update the documentation to reflect we use this parameter to control read(2) sizes, too.
2013-10-29implement user switching
This was documented (incorrectly) and not implemented for either the master/worker or single process cases. Implement and test all (with mocks, so not fully-tested).
2013-10-29doc: preliminary manpages for yahns(1), yahns_config(5)
This should hopefully make yahns more appealing and easier-to-use.