Skip to content

divbhasin/go-lb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Build Status License: MIT

go-lb: A basic load balancer implemented in Go

go-lb is a load balancer implemented with Go. It uses simple round robin to select backends to handle requests, and performs passive health checks to eliminate inactive backends. It uses http's Reverse Proxy to route requests and fetch responses. Please note that this project is still a work-in-progress.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Go language Built-in Go packages

Note: Make sure your GOBIN and GOPATH environment variables are set up appropriately. For example:

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin

Installing

To install, first run

go get github.com/divbhasin/go-lb

Usage

Usage of go-lb:
  -config string
    	The name of the config file to use (default: config.yml)

A sample config file:

port: 3030
backends:
  - localhost:3031
  - localhost:3031

Built With

  • Go - The language used
  • net/http - The package used to proxy requests

Author

  • Divyam Bhasin

License

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

Acknowledgments

About

A simple load balancer implemented with Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published