Skip to content

Yashh56/GoLoadBalancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLoadBalancer

A simple round-robin load balancer implemented in Go. This application distributes incoming HTTP requests to multiple backend servers.

Features

  • Round-robin load balancing
  • Health check for backend servers
  • Configurable backend servers through command-line arguments
  • Lightweight Docker image for easy deployment

image

Prerequisites

  • Go 1.22.3 or higher
  • Docker (optional, for running in a container)

Getting Started

Clone the Repository

git clone https://github.com/Yashh56/GoLoadBalancer.git
cd GoLoadBalancer

Build the Application

go build -o load_balancer

OR

docker build -t load_balancer .

Run the Application

./load_balancer -backends=http://backend1:8081,http://backend2:8082,http://backend3:8083

OR

docker run -p 3030:3030 load_balancer

This load balancer is inspired by the article Let's Create a Simple Load Balancer in Go .

About

A Simple Load Balancer using Go.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages