observable-demo

module
v0.0.0-...-15a3f70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2020 License: Apache-2.0

README

observable-demo

semver Maintenance Build StatusGo Doc Go Report Card

This repository includes simple L7 round robin loadbalancer implementation, instrumented with metrics.

WARNING : This is not meant to be production ready L7 loadbalancer. It's missing things like proper retrying, DNS discovery, logging, tracing etc, that might be added in future (:

This implementation was mainly used for presentations that showcase best practices for Prometheus based metrics Go instrumentation like:

Using demo

This demo is runable.

To run loadbalancer and Prometheus in docker run:

make demo

After this, you should be able to go via browser to:

  • http://localhost:8080/lb for load balancing endpoint, that loadbalanced to 3 fake endpoints.
  • http://localhost:8080/metrics for metric page
  • http://localhost:9090 for Prometheus UI that scrapes loadbalancer every second.

To curl loadbalancer every 500ms to generate traffic run in separate terminal:

make demo-test

Directories

Path Synopsis
cmd
loadbalancer command
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL