No description
  • JavaScript 96%
  • Shell 4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-08-07 19:52:19 +05:30
.gitignore rm node_modules 2024-08-07 19:18:29 +05:30
ConsistentHashing.js load balancer with nodejs 2024-08-07 19:18:01 +05:30
loadbalancer.js load balancer with nodejs 2024-08-07 19:18:01 +05:30
main.js load balancer with nodejs 2024-08-07 19:18:01 +05:30
package-lock.json load balancer with nodejs 2024-08-07 19:18:01 +05:30
package.json load balancer with nodejs 2024-08-07 19:18:01 +05:30
README.md loadbalancer readme 2024-08-07 19:52:19 +05:30
server-config.json load balancer with nodejs 2024-08-07 19:18:01 +05:30
servers.js load balancer with nodejs 2024-08-07 19:18:01 +05:30
test.sh load balancer with nodejs 2024-08-07 19:18:01 +05:30

LoadBalancer

A simple loadbalancer setup in nodejs, with 3 algorithm (roundrobin, leastconn, consistent-hashing) and 10 servers.

RoundRobin Algorithm

Roundrobin algorithm routes requests to servers in circular fashion.

LeastConn Algorithm

LeastConn algorithm routes requests to the server with least number of connections.

Consistent-hashing Algorithm

Consistent-hashing algorithm routes requests to the server with least hash value. source