romesdev / load-balancer-nginx

simple load-balancer with Nginx and Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

load-balancer-nginx

Simple load-balancer with Nginx and Docker based in the @joaovictornsv tutorial

How to use?

Run these commands after write the docker-compose.yaml.

Start the services

docker-compose up -d

Check if all was started

docker ps

Open a terminal to each instance and running the following commands:

// Open the terminal
docker-compose exec node1 bash

// See the logs
tail -f /var/log/nginx/host.access.log

Access the http://localhost:8080/ and refresh the page sometimes and see the magic.

NODE 1 NODE 2 NODE 3
Node 1 Node 2 Node 3

References

[1] How to build a simple LOAD-BALANCER in your machine using NGINX + DOCKER

[2] Nginx: do básico ao Load Balancer

About

simple load-balancer with Nginx and Docker

License:MIT License


Languages

Language:HTML 100.0%