https://github.com/sancakerkan/udploadbalancer
This project implements a simple UDP Load Balancer that distributes incoming UDP messages to a pool of backend servers using a round-robin scheduling algorithm.
https://github.com/sancakerkan/udploadbalancer
computernetworks load-balancer networks python round-robin udp
Last synced: 8 months ago
JSON representation
This project implements a simple UDP Load Balancer that distributes incoming UDP messages to a pool of backend servers using a round-robin scheduling algorithm.
- Host: GitHub
- URL: https://github.com/sancakerkan/udploadbalancer
- Owner: sancakerkan
- License: mit
- Created: 2024-06-24T11:34:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-02T00:23:22.000Z (about 1 year ago)
- Last Synced: 2025-01-10T02:20:12.076Z (9 months ago)
- Topics: computernetworks, load-balancer, networks, python, round-robin, udp
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UDP Load Balancer 🌐




This project implements a simple UDP Load Balancer that distributes incoming UDP messages to a pool of backend servers using a round-robin scheduling algorithm.
## Table of Contents
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [License](#license)## Description
The UDP Load Balancer receives messages from a client and forwards them to one of the available servers in a round-robin manner. It then waits for the server's response and forwards the response back to the client.
## Features
- Round-robin load balancing
- Timeout handling for server responses
- Error handling for communication issues### Example Output

(Click image to enlarge)## Installation
1. Clone the repository
2. Ensure you have Python installed (preferably Python 3.6+).
## Usage
1. Start the load balancer:
```bash
python UDPLoadBalancer.py
```2. Run your servers (Server1, Server2, Server3) on the specified ports.
3. Use the client to send messages to the load balancer:
```bash
python Client.py 127.0.0.1 12345
```## Configuration
- **Load Balancer Address and Port:**
- The load balancer listens on `127.0.0.1:12345` by default.
- Modify `LB_IP` and `LB_PORT` in `UDPLoadBalancer.py` to change the address and port.- **Server Addresses:**
- The server addresses are specified in `SERVER_ADDRESSES` in `UDPLoadBalancer.py`.
- Add or remove server addresses as needed.## Contributing
Contributions are welcome! Please fork the repository and use a feature branch. Pull requests are warmly welcome.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.