https://github.com/ali-master/nodejs-haproxy
Simple High availability load balancer in NodeJS with HaProxy
https://github.com/ali-master/nodejs-haproxy
Last synced: 4 months ago
JSON representation
Simple High availability load balancer in NodeJS with HaProxy
- Host: GitHub
- URL: https://github.com/ali-master/nodejs-haproxy
- Owner: ali-master
- Created: 2022-01-17T19:35:13.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-19T13:45:15.000Z (almost 4 years ago)
- Last Synced: 2025-04-14T11:53:36.283Z (8 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nodejs-haproxy
Simple High availability load balancer in NodeJS with HaProxy
### Requirements:
- Docker and Docker-compose
- [K6](https://k6.io)(Open source load testing tool and SaaS for engineering teams)
### Run
1. The first time you gonna run the Application:
```bash
docker-compose up --build -d
```
2. The second time:
```bash
docker-compose up -d
```
Application URI: `http://localhost`
HaProxy stats URI: `http://localhost:81`
### Shutting down the running containers
```bash
docker-compose down
```
### Logs
```bash
docker-compose logs
```
### Run API Load testing:
Make sure you installed the [K6](https://k6.io/docs/getting-started/installation/) before.
```bash
k6 run load-test.js
```