Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 691 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 691 Bytes

GoLB: The Lightweight, User-Friendly Load Balancer for Testing in Go

Discache

GoLB is a simple RoundRobin golang loadbalancer. It performs active cleaning and passive recovery for unhealthy backends.

Features:

  • Cleans: Excludes servers marked as unhealthy from the round-robin rotation.
  • Recovers: Periodically tries to recheck and reintegrate previously unhealthy servers back into service.
package main

import (
    "github.com/dhyanio/golb"
)

func main() {
    // Slice of servers
	servers := []string{"http://localhost:8081", "http://localhost:8082"}

    // Start Loadbalancer
	golb.Start(serverList, "3000")
}