Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/giovanni-iannaccone/webweaver

Golang load balancer โš–
https://github.com/giovanni-iannaccone/webweaver

collaborate go golang httpproxy load-balancer network web

Last synced: about 1 month ago
JSON representation

Golang load balancer โš–

Awesome Lists containing this project

README

        

logo

# ๐Ÿ•ธ WebWeaver

WebWeaver is a load balancer written in Go, designed to handle load balancing efficiently and at scale. With a modular architecture and simple configuration, WebWeaver is ideal for modern deployments and high-availability environments.

## ๐Ÿ“š Features

- **Automatic Failover**: Manages automatic failover of unavailable backend servers.
- **Dynamic Configuration**: Supports real-time configuration changes without needing a restart.
- **Fast**: Thanks to the fasthttp library, WebWeaver can quickly send packages across your network
- **Load Balancing**: Distributes requests across backend servers using various strategies, including Round-Robin, Random and IP Hash.
- **Monitoring and Logging**: Provides detailed statistics and request logging for in-depth monitoring.
- **Security**: Includes configuration options for protection against common threats and connection management.
- **Web UI**: thank to HTMX we can easly render a dashboard to give you detailed reports

## ๐Ÿ‘จโ€๐Ÿ’ป Installation

### ๐Ÿ“œ Prerequisites

- **Go 1.25+**: WebWeaver is written in Go and requires a compatible version of Go for compilation.

### ๐Ÿงช Installation Steps
1. **Clone the Repository**

```sh
git clone https://github.com/giovanni-iannaccone/WebWeaver
cd WebWeaver
```

2. **Run the Project**

Ensure you have Go installed, then run:

```sh
go run ./cmd/main.go
```

or compile it with
```sh
go build ./cmd
```

## โš™ Configuration

WebWeaver configuration is managed through a JSON file. Here's an example configuration:

```json
{
"algorithm": "rnd",
"host": "localhost:8080",
"dashboard": 8000,
"servers": [
"localhost:80",
"localhost:8081"
],

"healthCheck": 10,
"logs": "%USERPROFILE%\\Desktop\\logs.txt",

"prohibited": [
"/.env",
"/secret/"
]
}
```

- algorithm: rr for Round Robin, rnd for random choice, iph for ip hash
- host: the main server address
- servers: write here your servers addresses and ports
- healthCheck: seconds of the healthCheck timeout, put less than or 0 if you don't want the server to do any
- logs: file where to save logs, put nothing between quotes if you don't want to save logs
- prohibited: file you don't want the server to show

## ๐ŸŽฎ Usage

1. Write your configurations in the configs/configs.json file or give it as an argument with ```--config``` or ```-c``` flag
2. Run the main file with go

## ๐Ÿ”ญ Learn
Golang: https://go.dev/doc/

HTMX: https://htmx.org/docs

Load Balancing: https://www.cloudflare.com/learning/performance/what-is-load-balancing/

## ๐Ÿงฉ Contributing
We welcome contributing. See CONTRIBUTING.md file for details

## โš– License
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

## โš” Contact
- For any inquiries or support, please contact [email protected] .
- Visit my site for more informations about me and my work https://giovanni-iannaccone.github.io

# ๐Ÿ“ธ Screenshots
Dashboard screenshot