{"id":21053271,"url":"https://github.com/protik111/load-balancer-nginx-docker","last_synced_at":"2026-04-27T09:31:43.754Z","repository":{"id":254211984,"uuid":"825065430","full_name":"Protik111/load-balancer-nginx-docker","owner":"Protik111","description":"A simple load balancer with nginx that serves the request into two servers that are running on docker container.","archived":false,"fork":false,"pushed_at":"2024-08-23T09:40:24.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-30T17:34:33.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Protik111.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":"2024-07-06T17:06:51.000Z","updated_at":"2024-08-23T09:40:27.000Z","dependencies_parsed_at":"2024-11-19T16:15:48.371Z","dependency_job_id":null,"html_url":"https://github.com/Protik111/load-balancer-nginx-docker","commit_stats":null,"previous_names":["protik111/load-balancer-nginx-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Protik111/load-balancer-nginx-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Protik111%2Fload-balancer-nginx-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Protik111%2Fload-balancer-nginx-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Protik111%2Fload-balancer-nginx-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Protik111%2Fload-balancer-nginx-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Protik111","download_url":"https://codeload.github.com/Protik111/load-balancer-nginx-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Protik111%2Fload-balancer-nginx-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32331305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-19T16:05:36.727Z","updated_at":"2026-04-27T09:31:43.623Z","avatar_url":"https://github.com/Protik111.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# load-balancer-nginx-docker-v1\n![Architecture Diagram](./HLD/system.png)\n\n\n# Dockerized Node.js Project with Nginx Load Balancing\n\nThis project demonstrates how to Dockerize a Node.js application and set up Nginx as a load balancer to distribute traffic among multiple Node.js containers.\n\n## Prerequisites\n\nMake sure you have Docker installed on your machine. You can download and install Docker from [Docker's official website](https://www.docker.com/get-started).\n\n## Project Structure\n\n- **app.js**: Node.js application file.\n- **Dockerfile**: Dockerfile for building the Node.js application image.\n- **nginx.conf**: Custom Nginx configuration file for load balancing.\n\n## Setup Instructions\n\n### Step 1: Create Docker Network\n\nCreate a Docker network named `internal` to allow communication between containers:\n\n```bash\ndocker network create internal\ndocker build -t my-node-app .\n\ndocker run -d --name node-app --network internal -p 4000:4000 my-node-app\ndocker run -d --name node-app2 --network internal -p 4001:4000 my-node-app\n# Add more instances as needed, adjusting ports accordingly\ndocker run -d --name nginx --network internal -p 80:80 nginx:latest\n\ndocker cp ./nginx.conf nginx:/etc/nginx/conf.d/default.conf\n\ndocker restart nginx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotik111%2Fload-balancer-nginx-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotik111%2Fload-balancer-nginx-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotik111%2Fload-balancer-nginx-docker/lists"}