Skip to content

Commit

Permalink
Track number of inflight forwarded requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Oct 22, 2015
1 parent e2ce3e4 commit 2d74827
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/request-proxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ proto.removeSend = function removeSend(send) {

if (indexOf !== -1) {
this.sends.splice(indexOf, 1);
this.ringpop.stat('gauge', 'requestProxy.inflight', this.sends.length);
}

send.destroy();
Expand Down Expand Up @@ -131,6 +132,7 @@ proto.proxyReq = function proxyReq(opts) {
});

self.sends.push(send);
self.ringpop.stat('gauge', 'requestProxy.inflight', self.sends.length);

function onProxy(err, res1, res2) {
self.removeSend(send);
Expand Down

0 comments on commit 2d74827

Please sign in to comment.