{"id":20852718,"url":"https://github.com/ninesstack/haproxy-api","last_synced_at":"2025-09-02T00:33:15.089Z","repository":{"id":52929628,"uuid":"61039206","full_name":"NinesStack/haproxy-api","owner":"NinesStack","description":"A companion to service discovery platform Sidecar which allows decoupling HAproxy","archived":false,"fork":false,"pushed_at":"2021-04-14T12:23:55.000Z","size":11759,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T00:51:09.726Z","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/NinesStack.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}},"created_at":"2016-06-13T13:36:36.000Z","updated_at":"2021-05-04T08:14:41.000Z","dependencies_parsed_at":"2022-08-24T13:10:53.745Z","dependency_job_id":null,"html_url":"https://github.com/NinesStack/haproxy-api","commit_stats":null,"previous_names":["nitro/haproxy-api"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NinesStack%2Fhaproxy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NinesStack%2Fhaproxy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NinesStack%2Fhaproxy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NinesStack%2Fhaproxy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NinesStack","download_url":"https://codeload.github.com/NinesStack/haproxy-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253681903,"owners_count":21946828,"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-18T03:18:43.270Z","updated_at":"2025-05-12T05:30:52.342Z","avatar_url":"https://github.com/NinesStack.png","language":"Go","readme":"HAproxy-API\n===========\n\nThis application is a companion to\n[Sidecar](https://github.com/newrelic/sidecar) that allows you to run HAproxy\nand Sidecar in individual Docker containers that can be deployed separately. This\nhas the advantage of not taking down HAproxy while redeploying Sidecar. It is\nnot a general purpose API and relies heavily on the encoding of the state used\nby Sidecar.\n\nThis application will manage HAproxy by either running it or restarting it\nafter templating out a configuration from the provided Sidecar state.\n\nGenerally you will run this on the same host as the Sidecar instance it is\nsubscribed to. There might be situations like frontend gateways where it makes\nsense to subscribe it to a remote Sidecar instance. Its sole job is to receive\nstate from Sidecar and configure/manage HAproxy.\n\nYou may *instead* also run HAproxy-API in a follower mode where it can manage a\nlocal HAproxy while subscribing to a remote Sidecar. This is particularly\nuseful for local development work. It is probably not the best configuration\nfor production. This mode is triggered either by supplying a `hostname:port`\ncombination with the `-F` flag or by supplying the `HAPROXY_API_FOLLOW`\nenvironment variable where the vlaue is `hostname:port` of a remote or local\nSidecar.\n\nConfiguration\n-------------\n\nThere is a sample configuration in [haproxy-api.toml](haproxy-api.toml),\nincluding comments on what each item means. Generally you need to know the\nremote URL of a Sidecar instance you will connect to. If you run in host\nnetworking mode this will be `http://localhost:7777/state.json` if you have a\ncustom Docker network, then it will be somethign like `http://\u003cname of Sidecar\ncontainer\u003e:7777/state.json`. This URL is used for bootstrapping the container\nbecause we don't have any stored state. It will then receive updates from\nSidecar itself (if you've configured it to publish them), and won't make any\nfurther calls to Sidecar.\n\nHealth Checking\n---------------\n\n`haproxy-api` can be health checked by sending a `GET` request to the `/health`\nendpoint. This in turn simply checks to make sure that HAproxy is currently\nrunning by shelling out to `bash`, `ps`, and `grep`.\n\nContributing\n------------\n\nContributions are more than welcome. Bug reports with specific reproduction steps are great. If you have a code contribution you'd like to make, open a pull request with suggested code.\n\nPull requests should:\n\n * Clearly state their intent in the title\n * Have a description that explains the need for the changes\n * Include tests!\n * Not break the public API\n\nPing us to let us know you're working on something interesting by opening a GitHub Issue on the project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninesstack%2Fhaproxy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninesstack%2Fhaproxy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninesstack%2Fhaproxy-api/lists"}