Switcher Load Balancer
Simple load balancer to orquestrate endpoint availability
Simple load balancer to orquestrate endpoint availability
- NodeJS
- Postman (optional for request examples)
- Coffee =D
Switcher Load Balance is a simple load balance developed especially for supporting CI environments.
Main features:
- Auto switch off when a node is offline.
- Auto recover, forced or scheduled.
- Stateful configuration, no DB in between, the only latency is the network.
- Check node health via REST requests.
- API Key generated automatically after deployment.
- npm install
- Add .env-cmdrc file into the project directory.
Example:
{
"dev": {
"PORT": "3002",
"SNODE1": "http://localhost:3000",
"SNODE2": "https://switcherapi.com/api",
"CHECK_ENDPOINT": "/check",
"LOGGER": "true",
"RECOVER_ATTEMPT_DURATION": "60",
"RECOVER_INTERVAL": "10"
},
"prod": {
"PORT": "3002",
"SNODE1": "http://localhost:3000",
"SNODE2": "https://switcherapi.com/api",
"CHECK_ENDPOINT": "/check",
"LOGGER": "true",
"RECOVER_ATTEMPT_DURATION": "60",
"RECOVER_INTERVAL": "10"
},
"test": {
"PORT": "3002"
}
}
Donations for cookies and pizza are extremely welcomed.