lb

command module
v0.0.0-...-fb78d46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 6 Imported by: 0

README

lb

lb is a Go implementation of an HTTP Load Balancer that uses the Round Robin algorithm and the solution for the challenge Write You Own Load Balancer .

Usage
go build

./lb -h
Usage of ./lb:
  -a string
        Load balancer server address (default ":80")
  -i int
        Downstream servers health check interval in seconds (default 10)
  -r int
        Request timeout for downstream servers in seconds (default 10)
  -s string
        Comma-separated list of downstream servers (e.g. http://0.0.0.0:8080,http://localhost:8081)
  -t int
        Health check timeout in seconds (default 10)
  -u string
        Health check endpoint (e.g "/health-check") (default "/")

The be directory contains some simple HTML files that can be used by web servers for testing purposes. See an example using Python's built-in web server:

Tests
go test -v ./...
Benchmarks
go test ./... -bench=. -benchmem

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL