{"id":19811093,"url":"https://github.com/accenture/tldr-alb","last_synced_at":"2026-01-03T11:14:30.623Z","repository":{"id":141762293,"uuid":"51032763","full_name":"Accenture/tldr-alb","owner":"Accenture","description":"Application Load Balancer container for the The Lightweight Docker Runtime","archived":false,"fork":false,"pushed_at":"2016-03-04T03:08:25.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-22T10:13:50.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-02-03T21:43:59.000Z","updated_at":"2019-02-18T06:10:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f3af8c1-cde8-417d-9e3e-80ffa366e6e9","html_url":"https://github.com/Accenture/tldr-alb","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/Accenture%2Ftldr-alb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Ftldr-alb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Ftldr-alb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Ftldr-alb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/tldr-alb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"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-12T09:24:45.273Z","updated_at":"2026-01-03T11:14:30.560Z","avatar_url":"https://github.com/Accenture.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Application Load Balancer (ALB)\n\n# Pre-requisites\n\n- Docker Toolbox 1.9\n- A running Docker engine provisioned via Docker Machine (assumed to be \"alb\" in the rest of this documentation):\n\n```\ndocker-machine create -d virtualbox alb\n```\n\n# Building the container\n\n```\ndocker build -t tldr_alb .\n```\n\n# How it works\n\nTODO\n\n# Running the container\n\nUse the TLDR_LB_SERVICE_NAME environment variable, which identifies the names of the services that this load balancer should work with.\n\nVariable SERVICE_TAGS should contain ```tldr.type:lb``` to identify this component as a load balancer, and ```tldr.app:testapp``` to identify the app to which this load balancer belongs.\n\nAlso, provide the URL to the Consul server with the service information as a parameter:\n\n```\ndocker run --name=web_lb -e SERVICE_TAGS=web -e SERVICE_NAME=web_lb --dns 172.17.0.1 -p 80:80 -p 1936:1936 --rm alb -consul=$(docker-machine ip alb):8500\n```\n\nWhen ready, visit ```http://$(docker-machine ip alb):1936``` (someuser/password) to verify that both nginx containers are visible to haproxy. To access nginx, use ```http://$(docker-machine ip alb)/web-80``` (the 'web-80') part is a known issue.\n\n# Test run\n\nTo load balance a service called service1_testapp-80, use the following command:\n\n```\ndocker run --name=service1_testapp_lb -e TLDR_LB_SERVICE_NAME=service1_testapp-80  -e SERVICE_TAGS=tldr.type:lb,tldr.app:testapp -e SERVICE_NAME=service1_testapp_lb --dns 172.17.0.1 -p 80:80 -p 1936:1936 --rm pass_alb -consul=$(docker-machine ip alb):8500 -dry -once\n```\n\nAlternatively, use the scripts under the ```test``` folder:\n\n1. Run ```tests/setup.sh``` to bootstrap a docker-machine host with the needed components (Consul and registrator)\n2. Run ```tests/startService.sh 1``` to start two instances for the given service id/number\n3. Run ```tests/startAlb.sh 1``` to start a load balancer for the given servie id/number. Must match with the parameter provided to startService.sh.\n\n# Known issues\n\n* Haproxy restart after updating configuration may not correctly work, and instead multiple haproxy instances are spawned. This eventually leads to a situation where haproxy configuration data is not correct and the entire load balancer has to be restarted. This is due to issue https://github.com/hashicorp/consul-template/issues/442, which should be monitored. In the meantime, we have downgraded to consul-template 0.10.0 where the issue cannot be reproduced.\n* Zero downtime Haproxy reloads: http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Ftldr-alb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Ftldr-alb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Ftldr-alb/lists"}