Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including statsd-connection-counter with all npm packages installed. Try it out:

var statsdConnectionCounter = require("statsd-connection-counter")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

statsd-connection-counter v0.2.0

A small lib using node-statsd-client to count incoming connections as well as globalAgent connections and queue length by host

A quick and dirty module to count connections for servers and agents


If you are using the http Agent, and you throw to many connections to the same host, you are going to get slow.

This tells you how many sockets you have open, as well as the length of your request queue.

It also takes an http server and counts the number of incoming connections


var SDC = require("statsd-client")

var sdc = new SDC()
var myServer = http.createServer() //or an express server object
var connCounter = require("statsd-connection-count")

connCounter(sdc, myServer, 1000)
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free