LICENSE NEWS README
Raindrops Aggregate Aggregate::LastDataRecv Aggregate::PMQ InetDiagSocket LastDataRecv Linux ListenStats Middleware Middleware::Proxy Struct TCP_Info Watcher

class Raindrops::LastDataRecv

This is highly experimental!

A self-contained Rack application for aggregating in the tcpi_last_data_recv field in struct tcp_info defined in /usr/include/linux/tcp.h. This is only useful for Linux 2.6 and later. This primarily supports Unicorn and derived servers, but may also be used with any Ruby web server using the core TCPServer class in Ruby.

Hitting the Rack endpoint configured for this application will return a an ASCII histogram response body with the following headers:

The following headers are only present if X-Count is greater than one.

To use with Unicorn and derived servers (preload_app=false):

Put the following in our Unicorn config file (not config.ru):

require "raindrops/last_data_recv"

Then follow the instructions below for config.ru:

To use with any Rack server using TCPServer

Setup a route for Raindrops::LastDataRecv in your Rackup config file (typically config.ru):

require "raindrops"
map "/raindrops/last_data_recv" do
  run Raindrops::LastDataRecv.new
end
map "/" do
  use SomeMiddleware
  use MoreMiddleware
  # ...
  run YourAppHere.new
end

To use with any other Ruby web server that uses TCPServer

Put the following in any piece of Ruby code loaded after the server has bound its TCP listeners:

ObjectSpace.each_object(TCPServer) do |s|
  s.extend Raindrops::Aggregate::LastDataRecv
end

Thread.new do
  Raindrops::Aggregate::LastDataRecv.default_aggregate.master_loop
end

Then follow the above instructions for config.ru


Pages Classes Methods
mail archives: https://yhbt.net/raindrops-public/
	http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops-public 
	nntps://news.public-inbox.org/inbox.comp.lang.ruby.raindrops 
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops 
	imaps://yhbt.net/inbox.comp.lang.ruby.raindrops.0 
	imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops.0 
public: raindrops-public@yhbt.net
source code: git clone https://yhbt.net/raindrops.git
	torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops.git