{"id":26468654,"url":"https://github.com/strixrox/nodejs-load-balancer","last_synced_at":"2026-04-09T16:46:18.669Z","repository":{"id":282592728,"uuid":"949062595","full_name":"StrixROX/NodeJS-Load-Balancer","owner":"StrixROX","description":"Application Layer Load Balancer made using NodeJS and `http` module","archived":false,"fork":false,"pushed_at":"2025-03-15T16:53:35.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T17:25:18.197Z","etag":null,"topics":["application-layer","http","javascript","load-balancer","node","node-js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/StrixROX.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":"2025-03-15T15:36:20.000Z","updated_at":"2025-03-15T16:54:50.000Z","dependencies_parsed_at":"2025-03-15T17:35:32.734Z","dependency_job_id":null,"html_url":"https://github.com/StrixROX/NodeJS-Load-Balancer","commit_stats":null,"previous_names":["strixrox/nodejs-load-balancer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StrixROX%2FNodeJS-Load-Balancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StrixROX%2FNodeJS-Load-Balancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StrixROX%2FNodeJS-Load-Balancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StrixROX%2FNodeJS-Load-Balancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StrixROX","download_url":"https://codeload.github.com/StrixROX/NodeJS-Load-Balancer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244460247,"owners_count":20456301,"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":["application-layer","http","javascript","load-balancer","node","node-js"],"created_at":"2025-03-19T16:14:48.064Z","updated_at":"2026-04-09T16:46:18.660Z","avatar_url":"https://github.com/StrixROX.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS Load Balancer\n\nA load balancer made using `NodeJS`, `TypeScript` and `http` module. The load balancer operates in the Application Layer according to OSI model.\n\n## Getting Started\n\n### Clone the Repository\n\nYou can clone this repository on your local machine using the following bash command.\n\n```bash\ngit clone https://github.com/StrixROX/NodeJS-Load-Balancer.git\n```\n\n### Build the Project\n\nBefore running the project, you will have to build the project. For this you will first have to install the development dependencies using:\n\n```bash\nnpm install\n```\n\nNow, build the project using:\n\n```bash\nnpm run build\n```\n\nThe build output will get saved in `/dist` folder.\n\n### Start Initial Environment\n\n`src/index.ts` file provides some starter code to initialise the environment for using the load balancer. You can run it using the `start` script in `package.json` as such:\n\n```bash\nnpm start # servers run once\n```\n\nOR\n\n```bash\nnpm run dev # servers restart each time you save any source files\n```\n\nOn first run, your terminal output should look like this:\n\n```\n✔ [ OK ] Server created - localhost #1\n✔ [ OK ] Server created - localhost #2\n✔ [ OK ] Server created - localhost #3\n✔ [ OK ] Load Balancer created - localhost #LoadBalancer\n✔ [ OK ] Client Page Server created - localhost #ClientPageServer\n🟢 [ localhost #1 ] Listening on port 3001...\n🟢 [ localhost #2 ] Listening on port 3002...\n🟢 [ localhost #3 ] Listening on port 3003...\n🔷 [ localhost #LoadBalancer ] Listening on port 5000...\n🟢 [ localhost #ClientPageServer ] Listening on port 8080...\n```\n\nThere are 5 servers that get started by default - _3 backend servers, 1 load balancer server, 1 client page server_. Each server has an idea associated, indicated by a `#` prefix.\n\nYou can directly go to `http://localhost:8080` in your browser to open the client interface to start interacting with the app. _(Don't expect too much in terms of design :P)_\n\n### Running Tests\n\n```bash\nnpm test src/*\n```\n\n## Next Steps\n\n- Create a web-socket based interface to monitor network health\n- Add health-check functionality\n- Increase network throughput\n  - Create a variant which operates in the Transport Layer (OSI Layer 4)\n  - Try using HTTP/2 via `http2` module\n- Implement an SSL layer using `https` module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrixrox%2Fnodejs-load-balancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrixrox%2Fnodejs-load-balancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrixrox%2Fnodejs-load-balancer/lists"}