Skip to content

Demo of the instrumented L7 HTTP loadbalancer in Go following best practices.

License

Notifications You must be signed in to change notification settings

observatorium/observable-demo

Repository files navigation

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