New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

failover-proxy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

failover-proxy

TCP proxy with a dynamic fallback, designed for high availability systems.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
9
-18.18%
Maintainers
1
Weekly downloads
 
Created
Source

failover-proxy Build Status

TCP proxy with a dynamic fallback, designed for high availability systems.

When proxy receives an error from the receiving side (e.g. your backend servers), it redirects the traffic to the next server from the pool, assuring that data gets buffered in between requests.

Installation

npm install failover-proxy

Usage

API

var proxy = require('failover-proxy')({
  hosts: [
    {
      host: '127.0.0.1',
      port: 9001
    },
    {
      host: '127.0.0.1',
      port: 9002
    }
  ]
});

proxy.listen(9000);

proxy.on('cycle', function (badHost, newHost) {
  //
  // `cycle` event happens when proxy couldn't contact the backend host and
  // switched to the next server. You can put your own reporting logic in here.
  //
});

Binary

$ cat options.json
{
  "hosts": [
    {
      "host": "127.0.0.1",
      "port": 9001
    },
    {
      "host": "127.0.0.1",
      "port": 9002
    }
  ],
  "port": 9000
}
$ failover-proxy options.json
failover-proxy listening on 9000

FAQs

Package last updated on 23 Nov 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts