{"id":21740117,"url":"https://github.com/codercooke/goaround","last_synced_at":"2025-04-13T03:41:07.441Z","repository":{"id":45664999,"uuid":"170936847","full_name":"CoderCookE/goaround","owner":"CoderCookE","description":"HTTP load balancer and cache","archived":false,"fork":false,"pushed_at":"2024-12-19T22:23:26.000Z","size":77770,"stargazers_count":37,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T09:34:22.677Z","etag":null,"topics":[],"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/CoderCookE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["codercooke"]}},"created_at":"2019-02-15T22:31:18.000Z","updated_at":"2024-11-24T20:44:43.000Z","dependencies_parsed_at":"2023-10-16T23:59:40.130Z","dependency_job_id":"1dded237-3cb1-48ef-bdb2-f00c8e73f7cc","html_url":"https://github.com/CoderCookE/goaround","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/CoderCookE%2Fgoaround","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderCookE%2Fgoaround/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderCookE%2Fgoaround/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderCookE%2Fgoaround/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderCookE","download_url":"https://codeload.github.com/CoderCookE/goaround/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660780,"owners_count":21141346,"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":[],"created_at":"2024-11-26T06:12:13.821Z","updated_at":"2025-04-13T03:41:07.415Z","avatar_url":"https://github.com/CoderCookE.png","language":"Go","funding_links":["https://github.com/sponsors/codercooke"],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/CoderCookE/goaround.svg?branch=master)](https://travis-ci.org/CoderCookE/goaround)\n[![Maintainability](https://api.codeclimate.com/v1/badges/60d01111dd41a66baae3/maintainability)](https://codeclimate.com/github/CoderCookE/goaround/maintainability)\n[![Go Report Card](https://goreportcard.com/badge/github.com/codercooke/goaround)](https://goreportcard.com/report/github.com/codercooke/goaround)\n\n# GoAround\nHTTP load balancer that is capable of managing multiple server instances in a pool\nand balancing the incoming requests across those instances. If no backend instances\nare available a 503 error will be returned.\n\n## Make file\n\n### Building\n```\nmake\n```\n\n### Testing\n```\nmake test\n```\n\n## Running\nThe provided binary includes a `shasum` file located at `./bin/shasum` to check this value on macOS you can run:\n```\nshasum -a 1 ./bin/goaround\n```\nPlease ensure the `sha` matches prior to running or follow the directions above to build it yourself.\n\n```\nsudo ./bin/goaround -p 443 -b http://127.0.0.1:2702 -cacert /Users/ecook/cacert.pem -privkey /Users/ecook/privkey.pem\n```\n\n### Flags\n```\n-p port: defaults to 3000\n-b backend-address: may be passed multiple times\n-n max number of connections per backend\n-cacert location of certficate authority cert\n-privkey location of private key\n-cache enabled cache for get requests\n-prometheus-port defaults to 8080\n```\n\n### Flags\nMetrics are created using promethus, They can be found at `localhost:8080/metrics` or whatever ports is specified via `-prometheus-port`\n\n## Updating backends via unix socket\nPass a comma separated list of all backends;\n```\necho \"http://localhost:3000,http://localhost:3001\" | nc -U /tmp/goaround.sock\n\n```\nThe backends previously configured will be removed and replaced with only the ones passed in the updated list.\n\n## Detailed Implementation\nThis service starts a web server on a user defined port, passed via `-p` flag,\nif no flag is passed the service will default to port 3000.\n\nIf you pass both a `cacert` and `privkey`, the server will terminate ssl connections.\n\nBackend services are passed via `-b` flags, each backend passed will created a [connection](internal/connection/main.go),\nwhich are managed by a [pool](internal/pool/main.go).  The `connections` are pushed into a buffered channel\nwhere they are retrieved when the `Fetch` method is called on the `pool`.  The `Fetch` method will recursively pull connections\nfrom the channel until a request is completed successfully, or we run out of available connections.\n\nConnections subscribe to a health check channel, which is pushed to if their is a change in health status for the backend. Backend\nservices are assumed to have a `/health` endpoint, which will return a 200 response code.   Other response codes you wish be considered\nhealthy must return the body in the form `{\"state\": \"healthy\", \"message\": \"\"}`\n\n## Included Packages:\n[https://github.com/dgraph-io/ristretto](https://github.com/dgraph-io/ristretto)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodercooke%2Fgoaround","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodercooke%2Fgoaround","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodercooke%2Fgoaround/lists"}