{"id":38792496,"url":"https://github.com/angelicagardner/projects-in-go","last_synced_at":"2026-01-17T12:39:48.447Z","repository":{"id":238373439,"uuid":"796420301","full_name":"angelicagardner/projects-in-go","owner":"angelicagardner","description":" Various projects written in Go, each focusing on different applications. ","archived":false,"fork":false,"pushed_at":"2025-05-02T21:50:13.000Z","size":4576,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-02T22:27:04.492Z","etag":null,"topics":["golang","projects-done"],"latest_commit_sha":null,"homepage":"","language":"Go","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/angelicagardner.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,"zenodo":null}},"created_at":"2024-05-05T21:52:18.000Z","updated_at":"2025-05-02T21:50:17.000Z","dependencies_parsed_at":"2025-05-02T22:31:54.551Z","dependency_job_id":null,"html_url":"https://github.com/angelicagardner/projects-in-go","commit_stats":null,"previous_names":["angelicagardner/projects-in-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angelicagardner/projects-in-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelicagardner%2Fprojects-in-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelicagardner%2Fprojects-in-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelicagardner%2Fprojects-in-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelicagardner%2Fprojects-in-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelicagardner","download_url":"https://codeload.github.com/angelicagardner/projects-in-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelicagardner%2Fprojects-in-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","projects-done"],"created_at":"2026-01-17T12:39:47.912Z","updated_at":"2026-01-17T12:39:48.432Z","avatar_url":"https://github.com/angelicagardner.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Projects in Go\n\nThis repository contains small projects written in Go to explore different areas of backend development.\n\n## Projects\n\n### Load Balancer\n\nThis load balancer is designed to manage HTTP/HTTPS traffic at the application layer (L7), distributing incoming requests based on application-level data (URLs, headers, cookies, etc...) between backend servers using the simple scheduling algorithm round robin.\n\n#### Features\n\n- ✅ Distributes traffic across multiple backend servers (round-robin)\n- ✅ Performs periodic health checks on each backend (`/health`)\n- ✅ Automatically removes backends that fail health checks\n- ✅ Automatically re-adds healthy backends once they recover\n- ✅ Supports concurrent requests\n- ✅ Configurable health check interval via CLI flag (`--healthcheck-interval`)\n- ✅ Written in pure Go — no external dependencies\n- ✅ Includes test script to validate routing and fault tolerance\n\n#### Architecture Overview\n\n```scss\nClient\n  ↓\nLoad Balancer (:9090)\n  ↙       ↓       ↘\nBackend1 Backend2 Backend3\n(:8080)  (:8081)  (:8082)\n```\n\n#### Usage\n\n```bash\n# Build and run\ngo build -o lb main.go\n./lb --healthcheck-interval=10s -backends=http://localhost:8080,http://localhost:8081,http://localhost:8082\n```\n\n#### Health Check Logic\n\nEvery \u003cinterval\u003e seconds (default: 10s), the load balancer sends a GET /health request to each backend.\nIf the response is HTTP 200 OK, the server is marked as healthy. Otherwise, it is temporarily removed from rotation. Once it passes again, it is re-added.\n\n#### Testing\n\nA helper script to test is available in test/test.sh:\n\n```bash\n./test/test.sh\n```\n\nThis script:\n\n- Builds and starts 3 mock backends\n- Starts the load balancer\n- Sends 6 requests to verify round-robin behavior\n- Simulates a failing backend and ensures traffic is only routed to healthy ones\n- Simulates recovery and verifies the backend is added back\n- Tests concurrent request handling using `curl --parallel`\n\n### Tools (WIP)\n\nA collection of command-line tools including utility programs. Each tool is organized within its own module.\n\n---\n\nHappy Coding!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelicagardner%2Fprojects-in-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelicagardner%2Fprojects-in-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelicagardner%2Fprojects-in-go/lists"}