Logo vun OpenLoadBalancer

OpenLoadBalancer

Organisatioun
OpenLoadBalancer

High-performance zero-dependency L4/L7 load balancer written in Go. Single binary with Web UI, clustering, MCP/AI integration. 8.5K RPS, 39 E2E tests.

EditeurOpenLoadBalancer
Repositoryolb
SproochGo
Forks
5
Stären
25
Disponibel Tools
0
Transporttypstdio, streamable-http
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    OpenLoadBalancer stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    25 Stären an 5 Forks aus dem verlinkte Repository.

OpenLoadBalancer

Minimal-dependency L4/L7 load balancer for any backend. One binary. Written in pure Go. Only stdlib + golang.org/x/{crypto,net,text} — no external frameworks. Works with Node.js, Python, Java, Go, Rust, .NET, PHP — anything that speaks HTTP or TCP.

Quick Start

bash
curl -sSL https://openloadbalancer.dev/install.sh | sh

Create olb.yaml (or run olb setup for an interactive wizard):

yaml
admin:
  address: "127.0.0.1:8081"

listeners:
  - name: http
    address: ":80"
    routes:
      - path: /
        pool: web

pools:
  - name: web
    algorithm: round_robin
    backends:
      - address: "10.0.1.10:8080"
      - address: "10.0.1.11:8080"
    health_check:
      type: http
      path: /health
      interval: 10s
bash
olb start --config olb.yaml

That's it. HTTP proxy on :80, admin API on :8081, health checks every 10s, round-robin across two backends.

Install

bash
# Linux / macOS
curl -sSL https://openloadbalancer.dev/install.sh | sh

# Windows (PowerShell)
irm https://openloadbalancer.dev/install.ps1 | iex

# Docker (GHCR)
docker pull ghcr.io/openloadbalancer/olb:latest
docker run -d -p 80:80 -p 8081:8081 \
  -v ./olb.yaml:/etc/olb/configs/olb.yaml \
  ghcr.io/openloadbalancer/olb:latest

# Homebrew
brew tap openloadbalancer/olb && brew install olb

# Build from source
git clone https://github.com/openloadbalancer/olb.git && cd olb && make build

Requires Go 1.26+. Only stdlib + golang.org/x/{crypto,net,text}.

Features

Proxy: HTTP/HTTPS, WebSocket, gRPC, SSE, TCP (L4), UDP (L4), SNI routing, PROXY protocol v1/v2, Request Shadowing/Mirroring

Load Balancing: 16 algorithms — Round Robin, Weighted RR, Least Connections, Weighted Least Connections, Least Response Time, Weighted Least Response Time, IP Hash, Consistent Hash (Ketama), Maglev, Ring Hash, Power of Two, Random, Weighted Random, Rendezvous Hash, Peak EWMA, Sticky Sessions

Geo-DNS Routing: Geographic location-based traffic routing (country, region, city)

Security: TLS termination + SNI, ACME/Let's Encrypt, mTLS, OCSP stapling, 6-layer WAF (IP ACL, rate limiting, request sanitizer, detection engine with SQLi/XSS/path traversal/CMDi/XXE/SSRF, bot detection with JA3 fingerprinting, response protection with security headers + data masking), circuit breaker

Middleware: 16 components — Recovery, body limit, WAF (6-layer pipeline), IP filter, real IP, request ID, timeout, rate limit, circuit breaker, CORS, headers, compression (gzip), retry, cache, metrics, access log

Observability: Web UI dashboard (8 pages), TUI (olb top), Prometheus metrics, structured JSON logging, admin REST API (15+ endpoints), Grafana dashboard

Operations: Hot config reload (SIGHUP or API), Raft clustering + SWIM gossip, service discovery (Static/DNS/Consul/Docker/File), MCP server for AI integration, plugin system, 30+ CLI commands, distributed rate limiting, request shadowing/mirroring

MCP Integration (AI-Powered Management)

OpenLoadBalancer includes a built-in Model Context Protocol (MCP) server that enables AI agents (Claude, GPT, Copilot) to monitor, diagnose, and manage the load balancer.

Transport

  • SSE (Server-Sent Events): GET /sse for streaming + POST /message for commands — MCP spec compliant
  • HTTP POST: POST /mcp for simple request/response (backwards compatible)
  • Stdio: Line-delimited JSON-RPC over stdin/stdout for local CLI tools

Authentication

yaml
admin:
  mcp_address: ":8082"
  mcp_token: "your-secret-token"   # Bearer token auth
  mcp_audit: true                   # Log all tool calls

17 MCP Tools

CategoryTools
Metricsolb_query_metrics — RPS, latency, error rates, connections
Backendsolb_list_backends, olb_modify_backend — Add, remove, drain, enable/disable
Routesolb_modify_route — Add, update, remove routes with traffic splitting
Diagnosticsolb_diagnose — Automated error/latency/capacity/health analysis
Configolb_get_config, olb_get_logs, olb_cluster_status
WAFwaf_status, waf_add_whitelist, waf_add_blacklist, waf_remove_whitelist, waf_remove_blacklist, waf_list_rules, waf_get_stats, waf_get_top_blocked_ips, waf_get_attack_timeline

Connect from Claude Desktop

json
{
  "mcpServers": {
    "olb": {
      "url": "http://localhost:8082/sse",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

Performance

Benchmarked on AMD Ryzen 9 9950X3D:

MetricResult
Peak RPS15,480 (10 concurrent, round_robin)
Proxy overhead137µs (direct: 87µs → proxied: 223µs)
RoundRobin.Next3.5 ns/op, 0 allocs
Middleware overhead< 3% (full stack vs none)
WAF overhead (6-layer)~35μs per request, < 3% at proxy scale
Binary size~13 MB
P99 latency (50 conc.)22ms
Success rate100% across all tests
AlgorithmRPSAvg LatencyDistribution
random12,9133.5ms32/34/34%
maglev11,5973.8ms68/2/30%
ip_hash11,0624.0ms75/12/13%
power_of_two10,7084.0ms34/33/33%
least_connections10,1194.4ms33/33/34%
consistent_hash8,8974.6ms0/0/100%
weighted_rr8,0425.6ms33/33/34%
round_robin7,3206.3ms35/33/32%

See docs/benchmark-report.md for the complete report including concurrency scaling, backend latency impact, and middleware overhead measurements.

E2E Verified

56+ end-to-end tests across 70 packages with 95.3% coverage:

CategoryVerified
ProxyHTTP, HTTPS/TLS, WebSocket, SSE, TCP, UDP
AlgorithmsRR, WRR, LC, IPHash, CH, Maglev, P2C, Random, RingHash
MiddlewareRate limit (429), CORS, gzip (98% reduction), WAF 6-layer (SQLi/XSS/CMDi/path traversal → 403, rate limit → 429, monitor mode, security headers, bot detection, IP ACL, data masking), IP filter, circuit breaker, cache (HIT/MISS), headers, retry
OperationsHealth check (down/recovery), config reload, weighted distribution, session affinity, graceful failover (0 downtime)
InfraAdmin API, Web UI, Prometheus, MCP server, multiple listeners
Performance15K RPS, 137µs proxy overhead, 100% success rate

Algorithms

AlgorithmConfig NameUse Case
Round Robinround_robinDefault, equal backends
Weighted Round Robinweighted_round_robinUnequal backend capacity
Least Connectionsleast_connectionsLong-lived connections
Least Response Timeleast_response_timeLatency-sensitive
IP Haship_hashSession affinity by IP
Consistent Hashconsistent_hashCache locality
MaglevmaglevGoogle-style hashing
Ring Hashring_hashConsistent with vnodes
Power of Twopower_of_twoBalanced random
RandomrandomSimple, no state

Configuration

Supports YAML, JSON, TOML, and HCL with ${ENV_VAR} substitution.

yaml
admin:
  address: "127.0.0.1:8081"

middleware:
  rate_limit:
    enabled: true
    requests_per_second: 1000
  cors:
    enabled: true
    allowed_origins: ["*"]
  compression:
    enabled: true

waf:
  enabled: true
  mode: enforce
  detection:
    enabled: true
    threshold: {block: 50, log: 25}
  bot_detection: {enabled: true, mode: monitor}
  response:
    security_headers: {enabled: true}

listeners:
  - name: http
    address: ":8080"
    routes:
      - path: /api
        pool: api-pool
      - path: /
        pool: web-pool

pools:
  - name: web-pool
    algorithm: round_robin
    backends:
      - address: "10.0.1.10:8080"
      - address: "10.0.1.11:8080"
    health_check:
      type: http
      path: /health
      interval: 5s

  - name: api-pool
    algorithm: least_connections
    backends:
      - address: "10.0.2.10:8080"
        weight: 3
      - address: "10.0.2.11:8080"
        weight: 2

See docs/configuration.md for all options.

Geo-DNS Routing Example

yaml
geodns:
  enabled: true
  default_pool: default-pool
  rules:
    - id: us-traffic
      country: US
      pool: us-pool
      fallback: default-pool
    - id: eu-traffic
      country: EU
      pool: eu-pool
    - id: asia-traffic
      country: JP
      region: Tokyo
      pool: asia-pool

Request Shadowing Example

yaml
shadow:
  enabled: true
  percentage: 10.0  # Mirror 10% of traffic
  copy_headers: true
  copy_body: false
  timeout: 30s
  targets:
    - pool: staging-pool
      percentage: 100.0

Distributed Rate Limiting Example

yaml
waf:
  enabled: true
  rate_limit:
    enabled: true
    store:
      type: redis
      address: "localhost:6379"
      database: 0
    rules:
      - id: per-ip
        scope: ip
        limit: 1000
        window: 1m

CLI

bash
olb setup                            # Interactive config wizard
olb start --config olb.yaml         # Start proxy
olb stop                             # Graceful shutdown
olb reload                           # Hot-reload config
olb status                           # Server status
olb top                              # Live TUI dashboard
olb backend list                     # List backends
olb backend drain web-pool 10.0.1.10:8080
olb health show                      # Health check status
olb config validate olb.yaml         # Validate config
olb cluster status                   # Cluster info

Architecture

                    ┌─────────────────────────────────────────────────┐
                    │              OpenLoadBalancer                    │
  Clients ─────────┤                                                  │
  HTTP/S, WS,      │  Listeners → Middleware → Router → Balancer → Backends
  gRPC, TCP, UDP   │  (L4/L7)     (16 types)   (trie)   (16 algos)  │
                    │                                                  │
                    │  WAF (6 layers) │ TLS │ Cluster │ MCP │ Web UI  │
                    │  GeoDNS │ Shadow │ Discovery │ Prometheus      │
                    └─────────────────────────────────────────────────┘

Documentation

GuideDescription
Getting StartedStep-by-step tutorial
ConfigurationAll config options
Production DeploymentProduction deployment guide
TroubleshootingTroubleshooting playbook
Migration GuideMigrate from NGINX/HAProxy/Traefik
AlgorithmsAlgorithm details
API ReferenceOpenAPI/Swagger spec
ClusteringMulti-node setup
WAFWeb Application Firewall (6-layer defense)
MCP / AIAI integration
BenchmarksPerformance data
SpecificationTechnical spec

Contributing

See CONTRIBUTING.md. Key rules:

  1. Minimal external deps — stdlib + golang.org/x/{crypto,net,text} only
  2. Tests required — 85% coverage, don't lower it
  3. All features wired — no dead code in engine.go
  4. gofmt + go vet — CI enforced

License

Apache 2.0 — LICENSE

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "openloadbalancer-olb": {
      "command": "npx",
      "args": [
        "-y",
        "olb"
      ]
    }
  }
}

OpenLoadBalancer MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal OpenLoadBalancer verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dir kënnt MCP lokal op Ärem Apparat ausféieren oder Iech mat enger Remote-MCP-Server-URL verbannen.

Optioun 1: De lokale Connector benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

OpenLoadBalancer als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu OpenLoadBalancer an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "openloadbalancer-olb": {
      "command": "npx",
      "args": [
        "-y",
        "olb"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu OpenLoadBalancer. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu OpenLoadBalancer.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat OpenLoadBalancer?
OpenLoadBalancer
Jo. Ech hunn et gelies.
Dat hunn ech mat OpenLoadBalancer fonnt.

Optioun 2: Eng MCP-Server-URL derbäisetzen

Benotzt dës Optioun, wann OpenLoadBalancer scho remote gehost gëtt oder Är Ekipp ee gemeinsame Connector wëllt, op dee méi Benotzer kënnen zougräifen.

1

MCP-Connectoren opmaachen

Gitt an TypingMind op „Plugins“, maacht „MCP-Connectoren“ op a wielt dann „URL derbäisetzen“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Gitt op „Plugins“.
  3. Maacht „MCP-Connectoren“ op.
  4. Klickt op „URL derbäisetzen“.
TypingMind-Formulaire fir eng benotzerdefinéiert MCP-Server-URL derbäizesetzen
2

D'Server-URL apeschen

Gitt Är Server-URL am Feld „Server-URL“ an. Setzt e Verbindungsnumm, eng Beschreiwung, e Symbol, benotzerdefinéiert HTTP-Headeren oder OAuth-Clientastellungen derbäi, wann de Server se erfuerdert.

  1. Pescht Är Server-URL an d'Feld „Server-URL“.
  2. Gitt en Numm fir d'Verbindung mat OpenLoadBalancer an.
  3. Setzt eng Beschreiwung an e Symbol derbäi, fir d'Verbindung méi einfach erëmzeerkennen.
  4. Setzt benotzerdefinéiert HTTP-Headeren oder OAuth-Clientdetailer derbäi, wann de Server eng Authentifizéierung erfuerdert.
3

D'Verbindung erstellen

Klickt op „Verbindung erstellen“, gitt dann zeréck op d'Plugin-Lëscht a kontrolléiert, ob déi nei MCP-Verbindung aktiv ass.

  1. Klickt op „Verbindung erstellen“.
  2. Gitt zeréck op d'Lëscht vun de MCP-Connectoren.
  3. Kontrolléiert, ob d'Verbindung mat OpenLoadBalancer als aktiv ugewise gëtt.
  4. Aktualiséiert d'Plugin-Lëscht, wann d'Verbindung net direkt ugewise gëtt.
4

Modeller wiesselen ouni nei ze verbannen

Start e Chat mat Ärem bevorzugte Modell, aktivéiert d'Tools vu OpenLoadBalancer ënner „Plugins“ a wiesselt bei Bedarf op en anere Modell. D'MCP-Verbindung bleift am TypingMind-Aarbechtsberäich disponibel.

  1. Start en neie Chat an TypingMind.
  2. Wielt de KI-Modell, deen Dir benotze wëllt.
  3. Aktivéiert d'Tools vu OpenLoadBalancer ënner „Plugins“.
  4. Biet de Modell, den Tool ze benotzen, wann néideg.
  5. Wiesselt op en anere KI-Modell a benotzt déiselwecht MCP-Verbindung weider.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat OpenLoadBalancer?
OpenLoadBalancer
Jo. Ech hunn et gelies.
Dat hunn ech mat OpenLoadBalancer fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server OpenLoadBalancer benotzt?

OpenLoadBalancer ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech OpenLoadBalancer MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir OpenLoadBalancer mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat OpenLoadBalancer MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann OpenLoadBalancer verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech OpenLoadBalancer MCP mat TypingMind?

Dir kënnt OpenLoadBalancer iwwer de lokale MCP-Connector oder iwwer d'URL vun engem Remote-MCP-Server mat TypingMind verbannen. Benotzt de lokale Connector, wann de Server Zougrëff op Fichieren, Apps oder privat Ressourcen op Ärem Apparat brauch, an eng Server-URL, wann de MCP-Server op Distanz gehost gëtt.

Wéi eng Tools stellt OpenLoadBalancer MCP an TypingMind zur Verfügung?

OpenLoadBalancer stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir OpenLoadBalancer MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann OpenLoadBalancer eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇