Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
chakhsu committed Mar 4, 2024
1 parent ce36444 commit a9239dc
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 95 deletions.
8 changes: 4 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

A Node.js module for load balancing based on the Weighted Round Robin (WRR) algorithm, implemented as a simulation of the Nginx WRR algorithm.

### Principle Overview
### Overview

Consider three nodes {a, b, c} with respective weights {a=5, b=1, c=1}. If we send 7 requests, node a will be assigned 5 times, node b will be assigned once, and node c will also be assigned once.

Expand All @@ -31,11 +31,11 @@ Algorithm logic:
2. `currentWeight = currentWeight + effectiveWeight`. Select the node with the highest `currentWeight` as the chosen node.
3. `currentWeight` of the selected node is reduced by `totalWeight`.

### Module Description
### Description

This module provides two types of weighted round-robin tables for load balancing. One is a forward order table, where nodes with higher weights receive more assignments. The other is a reverse order table, where nodes with lower weights receive more assignments.

### Module Installation
### Installation

```
npm install wrr-plus
Expand All @@ -45,7 +45,7 @@ yarn add wrr-plus
pnpm add wrr-plus
```

### Usage Instructions
### Usage

Example:

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@
"test": "jest"
},
"dependencies": {
"joi": "^17.11.0",
"mathjs": "^12.2.1"
"joi": "^17.12.2",
"mathjs": "^12.4.0"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"husky": "^8.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.24",
"husky": "^9.0.11",
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.1",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsc-esm-fix": "^2.20.21",
"tsc-esm-fix": "^2.20.26",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit a9239dc

Please sign in to comment.