Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Adaptive Load Balancer

Go Version License Issues Pull Requests

A high-performance, intelligent Layer 7 load balancer written in Go. This project aims to distribute network traffic across backend servers efficiently using adaptive algorithms, ensuring high availability and fault tolerance. It comes equipped with a real-time monitoring dashboard to visualize cluster health.

🚀 Key Features

  • Adaptive Routing: Intelligently routes traffic based on server load, response time, and active connections.
  • Active Health Checks: Automatically detects unhealthy backends and removes them from the pool until they recover.
  • Concurrency: Built on Go's goroutines to handle thousands of concurrent requests with minimal footprint.
  • Visual Dashboard: A web-based interface (located in dashboard/) to monitor traffic flow and server status in real-time.
  • Configurable: Easy-to-adjust settings for ports, timeouts, and backend pools.

📂 Repository Structure

.
├── cmd/
│   └── balancer/    # Application entry point (main.go)
├── dashboard/       # Frontend dashboard code
├── internal/        # Core logic (Balancing algorithms, Health checks)
├── go.mod           # Go module definitions
└── go.sum           # Dependency checksums

🛠️ Getting Started

Prerequisites

Installation

  1. Clone the repository
git clone [https://github.com/Suke2004/load-balancer.git](https://github.com/Suke2004/load-balancer.git)
cd load-balancer
  1. Install dependencies
go mod download
  1. Run the Load Balancer
go run cmd/balancer/main.go

The server should start on the default port (e.g., 8080). You can verify it is running by sending a request to localhost or opening the dashboard URL provided in the terminal logs.

⚙️ Configuration

Configuration can usually be modified via flags or a config file (depending on implementation details). Common settings to look for in main.go:

  • Port: Listening port for the balancer.
  • Backends: List of target servers.
  • Strategy: Round Robin, Least Connections, or Weighted.

🧪 Running Tests

To run the unit tests for the internal packages:

go test -v ./internal/...

🤝 Contributing

We welcome contributions! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

📄 License

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


Created by Suke2004

About

Smart Adaptive Load Balancer in GOlang

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages