{"id":16683050,"url":"https://github.com/hlts2/glber","last_synced_at":"2025-04-09T23:14:13.776Z","repository":{"id":144203728,"uuid":"141271389","full_name":"hlts2/glber","owner":"hlts2","description":"Simple lightweight  load balancer written in golang","archived":false,"fork":false,"pushed_at":"2019-03-14T17:06:44.000Z","size":2609,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T23:14:08.760Z","etag":null,"topics":["go","golang","hlts2","lightweight","load-balancer","loadbalancer"],"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/hlts2.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-07-17T10:08:46.000Z","updated_at":"2022-02-17T02:47:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5ab9b24-209f-4871-933b-f092be7271f6","html_url":"https://github.com/hlts2/glber","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/hlts2%2Fglber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fglber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fglber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Fglber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlts2","download_url":"https://codeload.github.com/hlts2/glber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125589,"owners_count":21051770,"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":["go","golang","hlts2","lightweight","load-balancer","loadbalancer"],"created_at":"2024-10-12T14:10:10.713Z","updated_at":"2025-04-09T23:14:13.749Z","avatar_url":"https://github.com/hlts2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glber [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![GoDoc](http://godoc.org/github.com/hlts2/glber?status.svg)](http://godoc.org/github.com/hlts2/glber) [![Go Report Card](https://goreportcard.com/badge/github.com/hlts2/glber)](https://goreportcard.com/report/github.com/hlts2/glber) [![Join the chat at https://gitter.im/hlts2/glber](https://badges.gitter.im/hlts2/glber.svg)](https://gitter.im/hlts2/glber?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nglber is a simple lightweight load balancer written in golang.\n\n## Requirement\nGo (\u003e= 1.9)\n\n## Installation\n\n```shell\ngo get github.com/hlts2/glber\n```\n\n## Example\n\n### Config file\n\nConfig file `config.yml` describes configuration of load balancer.\nThe following is a setting example.\n\n```yaml\nhost: 0.0.0.0\nport: 80\nbalancing: round-robin\ntls:\n  enabled: true\n  cert_key: ./cert.key\n  key_key: ./key.key\nservers:\n  - scheme: http\n    host: 192.168.33.11\n    port: 1111\n  - scheme: http\n    host: 192.168.33.11\n    port: 2222\n  - scheme: http\n    host: 192.168.33.11\n\n```\n\n### Balancing Algorithm\n\nThere are three possible algorithms for balancing\n\n- [round-robin](https://github.com/hlts2/round-robin)\n- [ip-hash](https://github.com/hlts2/ip-hash)\n- [least-connections](https://github.com/hlts2/least-connections)\n\nPlease write algorithm name in `balancing` field of `config.yml` file\n\n```\nbalancing: round-robin # or ip-hash or least-connections\n```\n\n### Basic Example\n\n```\n$ glber serve -s config.yml\n```\n\n## CLI Usage\n\n```\n$ glber --help\nNAME:\n   glber - Load Balancer\n\nUSAGE:\n   glber [global options] command [command options] [arguments...]\n\nVERSION:\n   v1.0.0\n\nCOMMANDS:\n     serve    serve load balancer\n     help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n### Serve command\n\n```\n$ glber serve --help\nNAME:\n   glber serve - serve load balancer\n\nUSAGE:\n   glber serve [command options] [arguments...]\n\nOPTIONS:\n   --set value, -s value  set the configuration file (default: \"config.yml\")\n```\n\n## TODO\n\n- [ ] Helth check of service\n\n## Author\n[hlts2](https://github.com/hlts2)\n\n## LICENSE\nglber released under MIT license, refer [LICENSE](https://github.com/hlts2/glber/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fglber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlts2%2Fglber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Fglber/lists"}