smart-stick-loadbalancer 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # Smart Stick Load Balancer
2
2
 
3
- A lightweight **sticky-session load balancer** for Node.js. It distributes requests to multiple backends, supports sticky sessions via cookies, performs health checks, and can optionally send email alerts.
3
+ A lightweight **sticky-session load balancer** for Node.js. It distributes requests to multiple backends, supports sticky sessions via cookies, performs health checks, and can optionally send email alerts.
4
4
 
5
5
  ---
6
6
 
7
7
  ## Features
8
8
 
9
- - Sticky sessions via cookies
10
- - Health checks with automatic failover
11
- - Optional email alerts
12
- - WebSocket and HTTP support
13
- - Minimal setup
9
+ - Sticky sessions via cookies
10
+ - Health checks with automatic failover
11
+ - Optional email alerts
12
+ - WebSocket and HTTP support
13
+ - Minimal setup
14
14
 
15
15
  ---
16
16
 
@@ -25,7 +25,6 @@ npm install smart-stick-loadbalancer
25
25
  ## Example Configuration (`config.json`)
26
26
 
27
27
  ```json
28
- module.exports = {
29
28
  {
30
29
  "port": 3001,
31
30
  "backends": [
@@ -38,7 +37,6 @@ module.exports = {
38
37
  "auth": { "user": "<your-email@gmail.com>", "pass": "<your-app-password>" }
39
38
  }
40
39
  }
41
- };
42
40
  ```
43
41
 
44
42
  ---
@@ -46,16 +44,16 @@ module.exports = {
46
44
  ## Usage
47
45
 
48
46
  ```js
49
- const { createStickyProxy } = require("smart-stick-loadbalancer");
50
- const config = require("./config.json");
47
+ const { createStickyProxy } = require('smart-stick-loadbalancer');
48
+ const config = require('./config.json');
51
49
 
52
50
  const lb = createStickyProxy(config);
53
51
  lb.start(); // starts the load balancer
54
52
  ```
55
53
 
56
- - Requests to `http://localhost:3001` will be forwarded to the backends.
57
- - Sticky sessions are automatically managed using cookies.
58
- - Health checks run periodically and remove unhealthy backends from rotation.
54
+ - Requests to `http://localhost:3001` will be forwarded to the backends.
55
+ - Sticky sessions are automatically managed using cookies.
56
+ - Health checks run periodically and remove unhealthy backends from rotation.
59
57
 
60
58
  ---
61
59
 
@@ -84,8 +82,8 @@ Response example:
84
82
 
85
83
  ## Email Alerts
86
84
 
87
- - Alerts are sent when a backend goes down or comes back up.
88
- - Requires valid Gmail credentials (or any supported email service).
85
+ - Alerts are sent when a backend goes down or comes back up.
86
+ - Requires valid Gmail credentials (or any supported email service).
89
87
 
90
88
  ---
91
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-stick-loadbalancer",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A lightweight sticky-session load balancer for Node.js with health checks and optional email alerts.",
5
5
  "main": "src/index.js",
6
6
  "bin": {