# ip-hash

> ip-hash balancing algorithm

Latest version **1.0.0** (published 2015-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install ip-hash
pnpm add ip-hash
yarn add ip-hash
bun add ip-hash
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-06-03 |
| First published | 2015-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Vadim Demedes |
| Maintainers | vdemedes |

## Links

- npm: https://www.npmjs.com/package/ip-hash
- Repository: https://github.com/vdemedes/ip-hash
- Homepage: https://github.com/vdemedes/ip-hash#readme
- Issues: https://github.com/vdemedes/ip-hash/issues
- npm.io page: https://npm.io/package/ip-hash

## Dependencies (1)

- [round-robin](https://npm.io/package/round-robin.md) github:vdemedes/round-robin

## Recent versions

- 1.0.0 (latest) — 2015-06-03

## README

# ip-hash [![Circle CI](https://circleci.com/gh/vdemedes/ip-hash.svg?style=svg)](https://circleci.com/gh/vdemedes/ip-hash)

Implementation of ip-hash balancing algorithm, based on [round-robin](https://github.com/vdemedes/round-robin).


### Installation

```
$ npm install ip-hash --save
```


### Usage

```javascript
const iphash = require('ip-hash');

let servers = [
	'server-1',
	'server-2',
	'server-3'
];

let assign = iphash(servers);

assign('192.168.0.1'); // => 'server-1'
assign('192.168.0.2'); // => 'server-2'
assign('192.168.0.3'); // => 'server-3'

assign('192.168.0.1'); // => 'server-1'
```


### Tests

[![Circle CI](https://circleci.com/gh/vdemedes/ip-hash.svg?style=svg)](https://circleci.com/gh/vdemedes/ip-hash)

```
$ make test
```


### License

ip-hash is released under the MIT license.

---
_Source: https://npm.io/package/ip-hash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
