raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.com
Subject: Re: raindrops/last_data_recv
Date: Fri, 25 Mar 2011 16:57:26 +0000
Message-ID: <20110325165726.GA719@dcvr.yhbt.net> (raw)
In-Reply-To: <4D8C7AEA.5000901@mrtech.ru>

Troex Nevelin <list@mrtech.ru> wrote:
> I've setup raindrops/last_data_recv with unicorn and rails:
> 
> I'm able to access /_raindrops and /raindrops/last_data_recv.
> The last one shows some aggregated data like Watcher, but what
> exactly?

last_data_recv only works for TCP, but can be more accurate than
watcher.  watcher snapshots the queue length at a predefined interval
(1s by default).  This means data can slip through the cracks between
intervals with watcher.

last_data_recv measures the actual time a client spent in the TCP queue
(rounded to the nearest 10ms[1]) before it was accept()-ed

In my experience, Watcher is much easier to setup and use.

I need to stick that in the rdoc/website somewhere...

> As I understand it is possible to implement Watcher
> functionality inside my App or in Raindrops middleware. If it is
> true than I'll not need Watcher to monitor my unicorns and I'll
> be able to collect the same data from middleware itself.

Yes, but Watcher needs to be run in a single-process (but
multi-threaded) for data sharing.  Reading tcp_diag or /proc/net/unix
can be expensive, so you really don't want multiple processes
aggregating the same data.

[1] - depends on the kernel timer resolution, I think, need to verify.

-- 
Eric Wong


      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 11:22 raindrops/last_data_recv Troex Nevelin
2011-03-25 16:57 ` Eric Wong [this message]

Reply instructions:

You may reply publically 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://bogomips.org/raindrops/

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

  git send-email \
    --in-reply-to=20110325165726.GA719@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.com \
    /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

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox