Skip to content

revilon1991/consul-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Consul Cluster

This repository provide knowledge test environment consul cluster. Contains three api backend node with balance traffic between that.

Installation

You must prepend install Docker Desktop.

git clone https://github.com/revilon1991/consul-cluster.git
cd consul-cluster
cp .env.dist .env
docker-compose up -d

Usage

Use your browser for view UI Consul interface on localhost:8585


# List all members of cluster
docker-compose exec proxy consul members

Use your browser for view work api backend balance localhost

Hello, visitor! This first node

or

Hello, visitor! This second node

or

Hello, visitor! This third node

Kill one of the nodes and you will feel freedom from the downtime of the share of your users.

docker-compose stop node_second

Consul Template instantly changes config of nginx and output is only first or second node without 5xx error.

Hello, visitor! This first node

or

Hello, visitor! This third node

After restore second node it will be again added to config nginx.

About

Consul Cluster test environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published