Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 3.02 KB

File metadata and controls

43 lines (28 loc) · 3.02 KB

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