Demos
OpenGSLB includes a comprehensive set of interactive demos that showcase its features and capabilities. Each demo builds on the previous one, introducing new concepts progressively.
Demo Overview
Demo |
Focus Area |
Key Features |
|---|---|---|
Basic Setup |
DNS load balancing, health checks, round-robin |
|
Distributed Architecture |
Proactive draining, agent gossip, zero-downtime |
|
Performance Optimization |
Latency-based routing, automatic adaptation |
|
Geographic Distribution |
GeoIP routing, EDNS Client Subnet, custom CIDR |
|
Proactive Health |
Predictive monitoring, chaos engineering, Grafana |
|
Real Client Latency |
TCP RTT learning, subnet aggregation, Azure multi-region |
Prerequisites
All demos require:
Docker and Docker Compose
Go 1.22+ (for building OpenGSLB)
Basic CLI tools:
dig,curl,jq
Building the Binary
Each demo requires the OpenGSLB binary built for Alpine Linux (musl libc):
# From the repository root
CGO_ENABLED=0 GOOS=linux go build -o opengslb ./cmd/opengslb
# Copy to the specific demo directory
cp opengslb demos/demo-X-*/bin/
Note
The CGO_ENABLED=0 flag is required because demo containers use Alpine Linux with musl libc instead of glibc.
Running a Demo
Each demo follows a consistent pattern:
# Navigate to the demo directory
cd demos/demo-X-*/
# Start the environment
docker-compose up -d --build
# SSH into the client container (password: demo)
ssh -p 2222 root@localhost
# Run the guided demo script
./demo.sh
# Stop the demo
docker-compose down -v
Learning Path
Beginner: Start with Demo 1
If you’re new to OpenGSLB, start with Demo 1: Standalone. It introduces:
Basic DNS load balancing concepts
Health check configuration
The Overwatch component
Intermediate: Demos 2 & 3
Once comfortable with the basics, explore:
Demo 2: Learn about the agent-overwatch architecture and proactive health signaling
Demo 3: Understand latency-based routing and automatic traffic optimization
Advanced: Demos 4, 5 & 6
For production-ready scenarios:
Demo 4: Geographic routing with GeoIP databases and custom CIDR mappings
Demo 5: Predictive health monitoring with chaos engineering
Demo 6: Passive latency learning with real TCP RTT data (requires Azure)
Demo Architecture Comparison
Demo 1: Simple Demo 2-5: Distributed
───────────────── ─────────────────────────
┌──────────┐ ┌──────────┐
│ Overwatch│◄────┐ │ Overwatch│◄──────────┐
└────┬─────┘ │ └────┬─────┘ │
│ │ │ Gossip │
│ Health │ │ │
│ Checks │ ▼ │
▼ │ ┌─────────┐ ┌─────────┐
┌─────────┐ │ │ Backend │ │ Backend │
│ Backend │ │ │ + Agent │ │ + Agent │
│ (nginx) │──────┘ └─────────┘ └─────────┘
└─────────┘
Troubleshooting
Common Issues
Binary not found
# Rebuild with correct flags
CGO_ENABLED=0 GOOS=linux go build -o demos/demo-X-*/bin/opengslb ./cmd/opengslb
Permission denied on config
# Config files require 600 permissions - rebuild the container
docker-compose build
docker-compose up -d
DNS queries fail
# Check if Overwatch is running
docker-compose ps
docker-compose logs overwatch
Port conflicts
# Stop all demos first
docker-compose down -v
# Check for conflicting services
lsof -i :2222 -i :8080 -i :9090