{"id":21884017,"url":"https://github.com/mongoexpuser/nodejs-load-balancer-on-ec2","last_synced_at":"2025-03-22T01:27:38.341Z","repository":{"id":210477061,"uuid":"726655052","full_name":"MongoExpUser/Nodejs-Load-Balancer-On-EC2","owner":"MongoExpUser","description":"Load Balancing of Web or Application Servers with NodeJS","archived":false,"fork":false,"pushed_at":"2023-12-14T09:44:03.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T19:37:25.243Z","etag":null,"topics":["aws","cloud-provider","ec2","load-balancer","logger-middleware","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/MongoExpUser.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T01:12:50.000Z","updated_at":"2023-12-03T10:33:37.000Z","dependencies_parsed_at":"2023-12-03T02:22:02.832Z","dependency_job_id":"e4b56ccf-a186-4dc7-bca4-6c4b8a1436a9","html_url":"https://github.com/MongoExpUser/Nodejs-Load-Balancer-On-EC2","commit_stats":null,"previous_names":["mongoexpuser/nodejs-load-balancer-on-ec2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FNodejs-Load-Balancer-On-EC2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FNodejs-Load-Balancer-On-EC2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FNodejs-Load-Balancer-On-EC2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FNodejs-Load-Balancer-On-EC2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MongoExpUser","download_url":"https://codeload.github.com/MongoExpUser/Nodejs-Load-Balancer-On-EC2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244892353,"owners_count":20527433,"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":["aws","cloud-provider","ec2","load-balancer","logger-middleware","nodejs"],"created_at":"2024-11-28T10:11:54.161Z","updated_at":"2025-03-22T01:27:38.320Z","avatar_url":"https://github.com/MongoExpUser.png","language":"JavaScript","readme":"\n## Nodejs-Load-Balancer-On-EC2\n\nLoad Balancing of Web or Application Servers with a NodeJS load balancer (lb) application.\n\n## Architectural Diagram\n![Image description](https://github.com/MongoExpUser/Nodejs-Load-Balancer-on-EC2/blob/main/nodejs-lb-arch-digram.png)\n\n    \n## Purpose\n * Load Balancing of Web or Application Servers on AWS EC2 machine.\n * The current demonstration is for an AWS EC2 instance but the NodeJS application can be run on any cloud provider VM e.g (Linode, GCP, Azure, OCI, DO, etc.) as long as the network is properly set up.\n\n\n## Advantages\n  * Fast.\n  * Cheaper.\n  * Easy to deploy.\n  * Load requests across multiple machines globally.\n\n\n## Install Dependency\n* NodeJS 19+ or above (https://nodejs.org/en/download)\n\n##  Run App\n* To run the load balancing app: \u003cbr\u003e\n  - Download the following source files in this repository: \u003cbr\u003e\n    - \u003cstrong\u003e appLB.js \u003c/strong\u003e \u003cbr\u003e\n    - \u003cstrong\u003e common.js \u003c/strong\u003e \u003cbr\u003e\n    - \u003cstrong\u003e config.json \u003c/strong\u003e \u003cbr\u003e\n  - Edit relevant input variables within the \u003cstrong\u003e config.json \u003c/strong\u003e file, as deem necessary. \u003cbr\u003e\n  - Upload the source files to the same folder on an AWS EC2 machine. \u003cbr\u003e\n  - Then, run the appLB.js script from within the folder as: \u003cbr\u003e \u003cstrong\u003e sudo node --inspect=$((9233 + $RANDOM % 100)) --trace-warnings --trace-deprecation --watch appLB.js \u003c/strong\u003e\n  \n\n# License\nCopyright © 2023. MongoExpUser\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fnodejs-load-balancer-on-ec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoexpuser%2Fnodejs-load-balancer-on-ec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fnodejs-load-balancer-on-ec2/lists"}