Backend latency tracking for the load balancer. Tracks connection lifetime (creation to close) as latency metric. Exposes per-backend histograms for Prometheus export.
Backend latency tracking for the load balancer. Tracks connection lifetime (creation to close) as latency metric. Exposes per-backend histograms for Prometheus export.
(get-all-histograms)Get all latency histograms. Returns map of [proxy-name target-id] -> histogram.
Get all latency histograms. Returns map of [proxy-name target-id] -> histogram.
(get-histogram proxy-name target-id)Get latency histogram for a specific backend. Returns histogram map with :buckets :counts :sum :count, or nil if not found.
Get latency histogram for a specific backend. Returns histogram map with :buckets :counts :sum :count, or nil if not found.
(get-histograms-for-metrics)Get histograms in format suitable for metrics collector. Returns map of [proxy-name target-ip target-port] -> histogram.
Get histograms in format suitable for metrics collector. Returns map of [proxy-name target-ip target-port] -> histogram.
(get-percentiles proxy-name target-id)Get latency percentiles for a backend. Returns {:p50 :p95 :p99 :mean :count} or nil if no data.
Get latency percentiles for a backend.
Returns {:p50 :p95 :p99 :mean :count} or nil if no data.(get-status)Get latency tracking status.
Get latency tracking status.
(record-latency! proxy-name target-id latency-sec)Record a connection latency observation for a backend. latency-sec: connection duration in seconds
Record a connection latency observation for a backend. latency-sec: connection duration in seconds
(reset-histograms!)Reset all latency histogram data.
Reset all latency histogram data.
(running?)Check if latency tracking is running.
Check if latency tracking is running.
(start! stats-stream conntrack-map proxy-name)Start latency tracking. Subscribes to stats event stream.
Parameters: stats-stream: the stats event stream from lb.stats/create-event-stream conntrack-map: the connection tracking BPF map proxy-name: name of the proxy (used for metric labels)
Start latency tracking. Subscribes to stats event stream. Parameters: stats-stream: the stats event stream from lb.stats/create-event-stream conntrack-map: the connection tracking BPF map proxy-name: name of the proxy (used for metric labels)
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 |