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

node-proxy-balancer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-proxy-balancer

What's my problem ? : => fount nothing js based that can handle multiple websocket servers like "haproxy" or "nginx"

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Proxy Load Balancer

What's my problem ? : => fount nothing js based that can handle multiple websocket servers like "haproxy" or "nginx"

What is this ? the nearest solution i fount was the 7years old upstream-proxy that can handle 1 endpoint per hostname, just added array and filtering to it (+ ssl support 👌)

proxy constructor :

{

config  = {}, /* same as setConfig ({
			name: 'localhost-websocket',
			hostnames: ['localhost'],
			endpoint: [{ host: '127.0.0.1', port: port1 },
					   {host: '127.0.0.1', port: port2 }]
			}) */
callbacks  = {}, /* custom functions for status codes, same as upstream-proxy */

ssl  = {}, /* same config as tls.createServer */

scale  =  'linear' /* 'linear' or 'random'(buggy👀) */

}

upstream balancing just add more endpoints to the config entry :

{

name: 'localhost-websocket',

hostnames: ['localhost'],

endpoint: [{ host: '127.0.0.1', port: port1 },{ host: '127.0.0.1', port: port2 }]

}

check the tests forked from : upstream-proxy

FAQs

Package last updated on 16 Mar 2023

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