Dynamic Load Balancer
- Dynamic NGINX configuration stored in redis
- Still heavily in development
- Inspired by the hipache-nginx project
- Uses the openresty version of nginx inorder to use lua scripts for connecting nginx to redis
Usage
- Run
docker-compose up - Launch redis-commander in browser at http://localhost:8081 or use redis-cli
- Run the following redis commands:
rpush frontend:9000 http://mb1:2525rpush frontend:9000 http://mb2:2525rpush frontend:9001 http://mb1:2525
- Now
curl http://localhost:9000should randomly go to either mb1 or mb2. Andcurl http://localhost:9001should always go to mb3.
TODOs
- Benchmarks vs a oob nginx instance
- Observability
- Support for HTTPS - DONE
- Support for TCP
- Distributed Support - Kubernetes poc
- Log Forwarding
On this page
Languages
C41.7%Go28.2%JavaScript15.3%Shell5.1%Dockerfile4.6%Lua3.6%Batchfile1.5%
Contributors
Created January 15, 2025
Updated March 12, 2025