{"id":19615019,"url":"https://github.com/ghurtchu/lb","last_synced_at":"2025-04-28T02:31:07.679Z","repository":{"id":190854242,"uuid":"683475165","full_name":"Ghurtchu/lb","owner":"Ghurtchu","description":"application layer load balancer","archived":false,"fork":false,"pushed_at":"2024-05-25T19:02:30.000Z","size":105540,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T05:11:23.546Z","etag":null,"topics":["cats-effect","concurrency","functional-programming","http4s","loadbalancer","scala","scala3"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/Ghurtchu.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}},"created_at":"2023-08-26T17:32:55.000Z","updated_at":"2024-05-25T19:02:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff828c03-a604-47e9-9fff-7dcec442ce58","html_url":"https://github.com/Ghurtchu/lb","commit_stats":{"total_commits":93,"total_committers":3,"mean_commits":31.0,"dds":0.4623655913978495,"last_synced_commit":"6ba3afe278cc86614584687065f924f9d9b40554"},"previous_names":["ghurtchu/lb","scalevolvable/lb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghurtchu%2Flb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghurtchu%2Flb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghurtchu%2Flb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghurtchu%2Flb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ghurtchu","download_url":"https://codeload.github.com/Ghurtchu/lb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251237903,"owners_count":21557366,"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":["cats-effect","concurrency","functional-programming","http4s","loadbalancer","scala","scala3"],"created_at":"2024-11-11T10:54:55.097Z","updated_at":"2025-04-28T02:31:05.814Z","avatar_url":"https://github.com/Ghurtchu.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Demo video tutorial for testing: https://www.youtube.com/watch?v=SkQ6s_nwCgY\n\nCurrent implementation uses round robin algorithm for distributing requests.\n\nAlso, it periodically checks the availabilty of backends and stops forwarding requests to the unavailable servers.\n\nAs soon as dead server is back and up \u0026 running it starts forwarding requests to it.\n\nComprehensive testing instructions:\n\nConfigure load balancer in `src/main/resources/application.conf`:\n![My Image](img/config.png)\n\n\nRun a few backends on different ports:\n- `./be 8081`\n![My Image](img/8081.png)\n- `./be 8082`\n![My Image](img/8082.png)\n- `./be 8083`\n![My Image](img/8083.png)\n\n\nRun the load balancer and observe health check logs:\n- `./lb`\n![My Image](img/lb-healthcheck-logs.png)\n\n\nPing the load balancer and observe responses from different servers:\n- `curl localhost:8080`\n![My Image](img/lb-curl.png)\n\n\nStop one of the backends (8081):\n![My Image](img/stop-8081.png)\n\n\nObserve the load balancer adjust distributing requests to only two servers:\n![My Image](img/lb-adjusted-1.png)\n\n\nRun the server with port 8081 again:\n- `./be 8081`\n![My Image](img/8081.png)\n\n\nObserve the load balancer adjust distributing requests to all three servers again:\n- `curl localhost:8080`\n![My Image](img/final.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghurtchu%2Flb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghurtchu%2Flb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghurtchu%2Flb/lists"}