All Projects → JackyChiu → Slb

JackyChiu / Slb

Licence: mit
Simple Load Balancer

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Slb

Gowp
golang worker pool , Concurrency limiting goroutine pool
Stars: ✭ 259 (+119.49%)
Mutual labels:  pool, concurrency
workerpool
A workerpool that can get expanded & shrink dynamically.
Stars: ✭ 55 (-53.39%)
Mutual labels:  concurrency, pool
Stormpot
A fast object pool for the JVM
Stars: ✭ 267 (+126.27%)
Mutual labels:  pool, concurrency
pool
Simple worker pool example 🏊‍♂️
Stars: ✭ 25 (-78.81%)
Mutual labels:  concurrency, load-balancer
Cekirdekler
Multi-device OpenCL kernel load balancer and pipeliner API for C#. Uses shared-distributed memory model to keep GPUs updated fast while using same kernel on all devices(for simplicity).
Stars: ✭ 76 (-35.59%)
Mutual labels:  pool, load-balancer
Pool
General Purpose Connection Pool for GRPC,RPC,TCP Sevice Cluster
Stars: ✭ 98 (-16.95%)
Mutual labels:  pool
Go Web Framework Benchmark
⚡ Go web framework benchmark
Stars: ✭ 1,601 (+1256.78%)
Mutual labels:  concurrency
Swimmer
🏊 Swimmer - An async task pooling and throttling utility for JS
Stars: ✭ 94 (-20.34%)
Mutual labels:  concurrency
Earl
Service Objects for Crystal (Agents, Artists, Supervisors, Pools, ...)
Stars: ✭ 89 (-24.58%)
Mutual labels:  pool
Frugal
Thrift improved
Stars: ✭ 113 (-4.24%)
Mutual labels:  concurrency
Java Interview
At the beginning, it was the repository with questions from Java interviews. Currently, it's more like knowledge base with useful links.
Stars: ✭ 114 (-3.39%)
Mutual labels:  concurrency
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+1080.51%)
Mutual labels:  concurrency
Poolboy
A hunky Erlang worker pool factory
Stars: ✭ 1,363 (+1055.08%)
Mutual labels:  pool
Swift Atomics
Atomic operations bridged from Clang to Swift
Stars: ✭ 109 (-7.63%)
Mutual labels:  concurrency
Job
JOB, make your short-term command as a long-term job. 将命令行规划成任务的工具
Stars: ✭ 98 (-16.95%)
Mutual labels:  concurrency
Unagi Chan
A haskell library implementing fast and scalable concurrent queues for x86, with a Chan-like API
Stars: ✭ 115 (-2.54%)
Mutual labels:  concurrency
Zlb
This is the repository of ZEVENET Load Balancer (next generation of Zen Load Balancer)
Stars: ✭ 90 (-23.73%)
Mutual labels:  load-balancer
Hark Lang
Build stateful and portable serverless applications without thinking about infrastructure.
Stars: ✭ 103 (-12.71%)
Mutual labels:  concurrency
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (-3.39%)
Mutual labels:  concurrency
Phantom Pool
PhantomJS resource pool based on generic-pool
Stars: ✭ 102 (-13.56%)
Mutual labels:  pool

Simple Load Balancer CircleCI Go Report Card

slb is a simple single node HTTP load balancer

Available strategies are:

These strategies for the node pools are also concurrent safe.

Demo

Round Robin

bin/slb -strategy round_robin -config config.json

Least Busy

bin/slb -strategy least_busy -config config.json

The pool was tested by a requester that produces tasks at a random interval, faster than the time it takes to complete the requests itself. The tasks also take an inconsistent amount of time to finish. In this example the requests were just sleeps.

The standard deviation measures how spread out the pending requests are across workers, giving us an idea of how well the pool is distributing work. As time goes by the average load goes up the standard deviation remains about the same!

Basically the smaller the Std Dev the better work is being distributed!

It's worth noting that because the requests aren't equal in the amount of work, the round robin balancer's standard deviation starts to climb. While the least busy strategy keeps the amount of pending tasks in account and results in a better distribution of requests.

Try The Demo

# clone the project
go get github.com/JackyChiu/slb
cd $GOPATH/src/github.com/JackyChiu/slb

# make project
make all

# start local servers (only for demo)
bin/servers -config config.json

# start balancer server
bin/slb -strategy <round_robin or least_busy> -config config.json

# start the requester (only for demo)
bin/requester

A json file is used to specify hosts that are in the node pool, and the port that the load balancer to run on.

{
  "port": 8000,
  "hosts": [
    "cool-app01.mydomain.com",
    "cool-app02.mydomain.com",
    "cool-app03.mydomain.com",
    "cool-app04.mydomain.com"
  ]
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].