its a in-house simple Load-Balancer, ReverseProxy and more.
- Round Robin Algorithm for balancing reqs
- Reverse Proxy for multiple backend servers
- Auto HealthCheck (backend server's)
- Mutex (Down/Up for backends)
- config file support
- http in-mem local cache
- more load-balancing algorithms
- git clone repo
go run main.go
- hit
localhost:8081
you will see a html page if everything is ok.
- add configs in
config.json
- "backend_hosts" -> add all your backend server IP
- "default_proxy_server" -> "add your desired proxy server,
by default it is
8081
"
e.g -> config.json
"default_lginx_port":"8081",
"proxy_pass":"",
"proxy_server_name":"lginx",
"backend_hosts":[
"http://127.0.0.1:8001",
"http://127.0.0.1:8002"
]
}