Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 993 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 993 Bytes

Go + Consul Distributed Loggers Demo

Simple Go + Consul Distributed System

Article: Building a simple Distributed System with Go & Consul

Alt text

DO NOT USE IN PRODUCTION This is a Proof of Concept and does not handle all corner cases

Components

  • consul: Consul instance that provides support for leader election and service discovery
  • distributed-logger: The Distributed Logger nodes expose a REST API that logs received messages to Stdout. Only the cluster leader accepts messages at any given time. A new node takes over in case of leader node failure.
  • producer: The producer queries Consul periodically to determine the distributed-logger leader and sends it a numbered message.

Demo instructions

Start services

docker-compose up -d --scale distributed-logger=3

Tail logs

docker-compose logs -f distributed-logger