{"id":20832968,"url":"https://github.com/udhos/disbalance","last_synced_at":"2025-05-08T01:40:44.646Z","repository":{"id":75074204,"uuid":"132972521","full_name":"udhos/disbalance","owner":"udhos","description":"disbalance - automagic load balancer","archived":false,"fork":false,"pushed_at":"2020-06-21T04:13:39.000Z","size":119,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-03T01:36:22.064Z","etag":null,"topics":["api","balance","go","golang","load-balancer","networking"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/udhos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-11T01:22:15.000Z","updated_at":"2021-08-08T14:29:17.000Z","dependencies_parsed_at":"2024-01-28T22:00:29.315Z","dependency_job_id":null,"html_url":"https://github.com/udhos/disbalance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fdisbalance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fdisbalance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fdisbalance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/udhos%2Fdisbalance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/udhos","download_url":"https://codeload.github.com/udhos/disbalance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252983761,"owners_count":21835758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","balance","go","golang","load-balancer","networking"],"created_at":"2024-11-18T00:13:50.196Z","updated_at":"2025-05-08T01:40:44.622Z","avatar_url":"https://github.com/udhos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/udhos/disbalance/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/udhos/disbalance)](https://goreportcard.com/report/github.com/udhos/disbalance)\n\n# disbalance\ndisbalance - automagic load balancer\n\n* [Features](#features)\n* [Quick Start](#quick-start)\n* [HTTPS](#https)\n* [How to test](#how-to-test)\n* [API](#api)\n* [Install](#install)\n\nCreated by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)\n\n# Features\n\n- Minimal required configuration. You are supposed to fire up disbalance and start using it.\n- Configuration automatically kept as YAML file. You are not required to edit it by hand.\n- Integrated web console. Use the web interface to quickly define load balancing rules.\n- REST API. Use the API to dynamically combine the load balancer with other services.\n\n# Quick Start\n\n## Without Modules, before Go 1.11\n\n    # make sure GOPATH is either unset or set to ~/go\n    go get github.com/udhos/disbalance\n    cd ~/go/src/github.com/udhos/disbalance\n    ./build-nomodules.sh\n    disbalance\n\n## With Modules, starting from Go 1.11\n\nWarning: gopherjs currently can't build the 'console' application using Modules. See https://github.com/gopherjs/gopherjs/issues/881.\n\n    git clone https://github.com/udhos/disbalance ;# clone outside of GOPATH\n    cd disbalance\n    ./build-modules.sh ;# currently fails because gopherjs does not support Go Modules yet\n    disbalance\n\nThen open http://localhost:8080/console\n\n# HTTPS\n\nIf you want to use TLS for the console, you will need a certificate:\n\n    openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout run/key.pem -out run/cert.pem\n\nThen start disbalance and open https://localhost:8080/console\n\n# How to test\n\n1. Run webservers on ports 8001 and 8002.\n\nExample:\n\n    go get github.com/udhos/gowebhello\n\n    gowebhello -addr :8001 -disableKeepalive \u0026\n    gowebhello -addr :8002 -disableKeepalive \u0026\n\n2. Then open the disbalance console http://localhost:8080/console and create a rule with targets for ports 8001 and 8002.\n\nCreate the rule with this information:\n\n    rule name: rule-1000\n    listener:  :8000\n    target:    localhost:8001\n    target:    localhost:8002\n\n3. Visit http://localhost:8000.\n\nExample:\n\n    curl http://localhost:8000\n\nYour web traffic should be distributed between localhost:8001 and localhost:8002.\n\n# API\n\nGet rule list:\n\n    curl -u admin:admin localhost:8080/api/rule/\n\nDelete rule 'rule1':\n\n    curl -u admin:admin -X DELETE localhost:8080/api/rule/rule1\n\nCreate/update inline rule 'rule1':\n\n    curl -u admin:admin -X POST -d '{rule1: {listener: \":2000\", protocol: tcp, targets: {2.2.2.2:80: {}}}}' localhost:8080/api/rule/\n\nReplace inline rule 'rule1':\n\n    curl -u admin:admin -X PUT -d '{listener: \":3000\", targets: {3.3.3.3:80: {}}}' localhost:8080/api/rule/rule1\n\nSave rule list to file 'rules':\n\n    curl -u admin:admin localhost:8080/api/rule/ \u003e rules\n\nLoad rule list from file 'rules':\n\n    curl -u admin:admin --data-binary @rules -X POST localhost:8080/api/rule/\n\n# Install\n\nYou can install disbalance as a systemd service by running the install.sh script:\n\n    sudo ./install.sh\n\n    sudo ./install.sh remove ;# this removes disbalance service from systemd\n\n-x-\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Fdisbalance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudhos%2Fdisbalance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudhos%2Fdisbalance/lists"}