Logo van OpenLoadBalancer

OpenLoadBalancer

Organisatie
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.

UitgeverOpenLoadBalancer
Repositoryolb
TaalGo
Forks
5
Sterren
25
Beschikbare tools
0
Transporttypestdio, streamable-http
Categorieën
Links
  • Koppel tools aan AI-workflows

    OpenLoadBalancer biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    25 sterren en 5 forks in de gekoppelde 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

Installatie

TypingMind
Vereisten:

Node.js 18+

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

Gebruik OpenLoadBalancer MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra OpenLoadBalancer is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Je kunt MCP lokaal op je apparaat uitvoeren of verbinding maken met de URL van een externe MCP-server.

Optie 1: Gebruik de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg OpenLoadBalancer toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van OpenLoadBalancer.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "openloadbalancer-olb": {
      "command": "npx",
      "args": [
        "-y",
        "olb"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van OpenLoadBalancer in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van OpenLoadBalancer in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je OpenLoadBalancer gebruiken om me hiermee te helpen?
OpenLoadBalancer
Zeker. Ik heb het gelezen.
Dit vond ik met OpenLoadBalancer.

Optie 2: Voeg een MCP-server-URL toe

Gebruik dit als OpenLoadBalancer al extern wordt gehost of als je team één gedeelde connector wil die meerdere gebruikers kunnen gebruiken.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer je server-URL in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak je server-URL in het veld Server-URL.
  2. Voer een verbindingsnaam in voor OpenLoadBalancer.
  3. Voeg een beschrijving en een icoon toe om de verbinding makkelijker te herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met OpenLoadBalancer als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van OpenLoadBalancer in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van OpenLoadBalancer in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je OpenLoadBalancer gebruiken om me hiermee te helpen?
OpenLoadBalancer
Zeker. Ik heb het gelezen.
Dit vond ik met OpenLoadBalancer.

Veelgestelde vragen

Waarvoor wordt de MCP-server OpenLoadBalancer gebruikt?

OpenLoadBalancer is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik OpenLoadBalancer MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je OpenLoadBalancer gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom OpenLoadBalancer MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als OpenLoadBalancer verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik OpenLoadBalancer MCP met TypingMind?

Je kunt OpenLoadBalancer met TypingMind verbinden via de lokale MCP-connector of door de URL van een externe MCP-server toe te voegen. Gebruik de lokale connector als de server toegang nodig heeft tot bestanden, apps of privébronnen op je apparaat. Gebruik een server-URL als de MCP-server extern wordt gehost.

Welke tools biedt OpenLoadBalancer MCP in TypingMind?

OpenLoadBalancer biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om OpenLoadBalancer MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als OpenLoadBalancer authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇