Skip to content

Harichandra-Prasath/Go-Balancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO BALANCER

This is a load Balancer built with go that can balance the requests across Backends.

Table of Contents

  1. Installation
  2. Configuration
  3. Future Work

Installation

  1. Clone the repository:
git clone https://github.com/Harichandra-Prasath/Go-Balancer.git
cd Go-Balancer
  1. Create config.json Configuration

  2. Run the application

make run

Configuration

Below is the template for config.json

{
    "Port":,
    "Backends":["","",...],
    "ALGO":"",
    "STATIC_ROOT":"",
    "MEDIA_ROOT":"",
    "Poll_Period":
}
  1. Port : INT
    Port for the Go-Balancer
  2. Backends : [ ]String
    List of Url strings of the backends
  3. ALGO : String
    Algorithm used to balance the requests
  4. STATIC_ROOT : String
    Path string of the directory used to server Static Content
  5. MEDIA_ROOT : String
    Path string of the directory used to server Media Content
  6. Poll_Period : UINT
    Time in seconds that should be used for Passive Health checking of the backends

It is must for the config.json to have all the fields, exlusion of any field will result in failure

Currently Supported Algorithms

"RR" : Round Robin
"LC" : Least Connections
"RANDOM" : Randomly choosen backend

Path MUST be Absolute from the root of the System

Future-Work

  1. Including additional Balancing Algorithms like Spill Over , etc..

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published