https://github.com/vitamaxoduol/microservices-load-balancer
https://github.com/vitamaxoduol/microservices-load-balancer
flask load-balancer microservices python
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vitamaxoduol/microservices-load-balancer
- Owner: vitamaxoduol
- License: mit
- Created: 2024-03-07T10:43:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-07T18:26:30.000Z (over 2 years ago)
- Last Synced: 2025-12-03T18:59:46.358Z (7 months ago)
- Topics: flask, load-balancer, microservices, python
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microservices Load Balancer
This project implements a microservices load balancer using Flask, designed to handle dynamic configuration updates, support multiple load balancing algorithms, provide HTTPS to microservices, implement circuit breakers and retries, offer a clean web UI, and support WebSocket and HTTP/2 protocols.
## Features
1. Load Balancing Algorithms:
Implements Round Robin, Least Connections, and Weighted Round Robin algorithms.
2. Dynamic Configuration:
Dynamically updates configuration without requiring restarts.
3. Health Checks:
Implements health checks to direct traffic only to healthy servers.
4. Scalability:
Designed to scale horizontally, supporting auto-discovery of new servers and dynamic configuration updates.
5. Logging and Monitoring:
Provides logging to track requests, responses, and server health.
Integrates with monitoring tools for performance insights.
6. Security:
Ensures secure handling of traffic, supporting SSL termination and security protocols.
7. Circuit Breakers and Retries:
Implements circuit breakers and retry mechanisms for enhanced reliability.
WebSocket and HTTP/2 Support:
8. Supports WebSocket and HTTP/2 protocols for diverse microservices communication.
## Getting Started
- Installation:
`pip install Flask`
- Run the Flask App:
`python app.py`
- Configuration:
Update configuration dynamically using the /update-config endpoint.
- Web UI:
Access the web UI at `http://localhost:5000`.
## Usage
- Processing Requests:
Send requests to the load balancer endpoint (/) for load-balanced processing.
- Health Checks:
Check the health of the load balancer at /health.
- Updating Configuration:
Use the /update-config endpoint to dynamically add or remove servers.
## Contributing
Fork the repository.
Create a new branch (git checkout -b feature/new-feature).
Commit your changes (git commit -m 'Add new feature').
Push to the branch (git push origin feature/new-feature).
Open a pull request.
## License
This project is licensed under the MIT License.