raindrops.git  about / heads / tags
real-time stats for preforking Rack servers
$ git log --pretty=format:'%h %s (%cs)%d'
8b300d9 README: update with extra disclaimer (2024-04-04)
	(HEAD -> master)
1056445 khashl: avoid multiplication overflow + memset (2024-04-03)
db72c4b linux_inet_diag: avoid errors for users compiling w/o assertions (2024-03-25)
4614194 khashl: use ruby_xrealloc2 to avoid overflow (2024-03-25)
38eba33 use switch to khashl for hash table outside of GVL (2024-03-25)
6d5ba2a linux_inet_diag: remove needless OBJ_FREEZE calls (2024-03-25)
a36cf00 treewide: future-proof frozen_string_literal changes (2024-03-23)
0a20ff1 gemspec: support rack 3.x (2024-01-15)
a46840c extconf: disable optimization to speed up checks by ~3% (2024-01-15)
2025f4e test/test_last_data_recv: don't require posix_mq (2024-01-15)
...

$ git cat-file blob HEAD:README
= raindrops - real-time stats for preforking Rack servers

raindrops is a real-time stats toolkit to show statistics for Rack HTTP
servers.  It is designed for preforking servers such as unicorn, but
should support any Rack HTTP server on platforms supporting POSIX shared
memory.  It may also be used as a generic scoreboard for sharing atomic
counters across multiple processes.

== Features

* counters are shared across all forked children and lock-free

* counters are kept on separate cache lines to reduce contention under SMP

* may expose server statistics as a Rack Middleware endpoint
  (default: "/_raindrops")

* middleware displays the number of actively processing and writing
  clients from a single request regardless of which worker process
  it hits.

== Linux-only Extra Features!

* Middleware response includes extra stats for bound TCP and
  Unix domain sockets (configurable, it can include stats from
  other TCP or UNIX domain socket servers).

* TCP socket stats use efficient inet_diag facilities via netlink
  instead of parsing /proc/net/tcp to minimize overhead.
  This was fun to discover and write.

* TCP_Info reporting may be used to check stat for every accepted client
  on TCP servers

Users of older Linux kernels need to ensure that the the "inet_diag"
and "tcp_diag" kernel modules are loaded as they do not autoload correctly

== Install

We recommend GCC 4+ (or compatible) to support the __sync builtins
(__sync_{add,sub}_and_fetch()):

https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html

For non-GCC 4+ users, we also support compilation with the libatomic_ops
package starting with Raindrops 0.4.0:

https://github.com/ivmai/libatomic_ops

If you're using a packaged Ruby distribution, make sure you have a C
compiler and the matching Ruby development libraries and headers.

If you use RubyGems:

    gem install raindrops

== Usage

See Raindrops::Middleware and Raindrops::LastDataRecv documentation for
use Rack servers.  The entire library is fully-documented and we are
responsive on the publicly archived mailbox
(mailto:raindrops-public@yhbt.net) if you have any questions or comments.

== Development

You can get the latest source via git from the following locations:

  https://yhbt.net/raindrops.git
  http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops.git
  http://repo.or.cz/w/raindrops.git (gitweb mirror)

Snapshots and tarballs are available.

Inline patches (from "git format-patch") to the mailbox are
preferred because they allow code review and comments in the reply to
the patch.

We will adhere to mostly the same conventions for patch submissions as
git itself.  See the Documentation/SubmittingPatches document
distributed with git on on patch submission guidelines to follow.  Just
don't email the git mailing list or maintainer with raindrops patches.

raindrops is licensed under the LGPL-2.1+

== Contact

All feedback (bug reports, user/development discussion, patches, pull
requests) go to the publicly archived mailbox:
mailto:raindrops-public@yhbt.net

Mail archives are available over HTTP(S), IMAP(S) and NNTP(S):

* https://yhbt.net/raindrops-public/
* http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops-public/
* imaps://yhbt.net/inbox.comp.lang.ruby.raindrops.0
* imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops.0
* nntps://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
* nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops

Since archives are public, scrub sensitive information and
use anonymity tools such as Tor or Mixmaster if you deem necessary.

There is NO WARRANTY whatsoever if anything goes wrong and
no commercial support will ever be provided by the amateur maintainer.
raindrops hackers are NOT responsible for your supply chain security:
read and understand it yourself or get someone you trust to audit it.
Malicious commits and releases will be made if under duress.  The only
defense you'll ever have is from reviewing the source code.

No user or contributor will ever be expected to sacrifice their own
security by running JavaScript or revealing any personal information.

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       README: update with extra disclaimer (2024-04-04)
  aggregate-pmq aggregate/pmq: avoid File#stat allocation (2017-03-18)
  freebsd      define Raindrops::TCP hash for TCP states (2017-03-17)
  gc-next      linux_inet_diag: improve compatibility with newer GCs (2013-06-16)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v0.20.1      raindrops 0.20.1 (2023-02-25) tar.gz
v0.20.0      raindrops 0.20.0 (2021-12-06) tar.gz
v0.19.2      raindrops 0.19.2 (2021-05-25) tar.gz
v0.19.1      raindrops 0.19.1 (2020-01-08) tar.gz
v0.19.0      raindrops 0.19.0 - Rack 2.x middleware compatibility (2017-08-09) tar.gz
v0.18.0      raindrops 0.18.0 (2017-03-23) tar.gz
v0.17.0      raindrops 0.17.0 - rack 2.x updates (2016-07-31) tar.gz
v0.16.0      raindrops 0.16.0 - minor fixes and workarounds (2016-02-29) tar.gz
v0.15.0      raindrops 0.15.0 - non-glibc compat fix on Linux (2015-07-22) tar.gz
v0.14.0      raindrops 0.14.0 - misc doc updates (2015-06-25) tar.gz
...

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

git clone http://yhbt.net/raindrops.git