Background manager for least-connections load balancing. Periodically scans connection tracking to compute and update weights based on the current connection distribution across backends.
Background manager for least-connections load balancing. Periodically scans connection tracking to compute and update weights based on the current connection distribution across backends.
(force-update!)Force an immediate weight update cycle.
Force an immediate weight update cycle.
(get-algorithm)Get the current load balancing algorithm.
Get the current load balancing algorithm.
(get-connection-counts)Get current connection counts per backend for metrics. Returns map of {proxy-name {ip-port connection-count}}.
Get current connection counts per backend for metrics.
Returns map of {proxy-name {ip-port connection-count}}.(get-proxy-info proxy-name)Get current info for a specific proxy.
Get current info for a specific proxy.
(get-status)Get current LB manager status.
Get current LB manager status.
(register-proxy! proxy-name
target-group
interfaces
port
listen-map
&
{:keys [get-health-fn get-drain-fn get-cb-fn]})Register a proxy for least-connections weight management.
proxy-name: Unique identifier for the proxy target-group: TargetGroup record interfaces: Vector of interface names to update port: Listen port listen-map: BPF listen map reference opts: Optional callbacks for integration: :get-health-fn - Returns vector of health booleans :get-drain-fn - Returns vector of drain booleans :get-cb-fn - Returns vector of circuit breaker states
Register a proxy for least-connections weight management.
proxy-name: Unique identifier for the proxy
target-group: TargetGroup record
interfaces: Vector of interface names to update
port: Listen port
listen-map: BPF listen map reference
opts: Optional callbacks for integration:
:get-health-fn - Returns vector of health booleans
:get-drain-fn - Returns vector of drain booleans
:get-cb-fn - Returns vector of circuit breaker states(running?)Check if the LB manager is running.
Check if the LB manager is running.
(start! conntrack-map lb-config)Start the LB manager background daemon.
conntrack-map: BPF conntrack map for connection counting lb-config: LoadBalancingConfig record with algorithm settings
Start the LB manager background daemon. conntrack-map: BPF conntrack map for connection counting lb-config: LoadBalancingConfig record with algorithm settings
(stop!)Stop the LB manager background daemon.
Stop the LB manager background daemon.
(unregister-proxy! proxy-name)Unregister a proxy from least-connections weight management.
Unregister a proxy from least-connections weight management.
(update-proxy-target-group! proxy-name new-target-group)Update the target group for a registered proxy. Used when targets change due to DNS resolution etc.
Update the target group for a registered proxy. Used when targets change due to DNS resolution etc.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |