The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / haproxy / haproxy-backend-queue-building-qcur

Operations Guides

HAProxy backend queue building (qcur): requests waiting for a free server slot

You are looking at HAProxy stats and qcur is nonzero on a backend, or worse, climbing. Clients have not seen errors yet, but latency is drifting up. That instinct that something is wrong is correct: qcur is the earliest signal that backend capacity is exhausted, and it shows up before any error counter moves.

qcur is the instantaneous count of connections sitting in a queue because every server that could take them is already at its maxconn limit. Those requests are not being served. They are parked, consuming their client’s timeout budget, waiting for a slot to free up. If the queue grows faster than slots free up, the outcome is queue timeouts and 503s.

This article covers what the queue actually is, how to read qcur alongside qmax, qtime, and qlimit, how to find out why it is growing, and what to change depending on the cause. For the bigger picture of how the queue fits into HAProxy’s request pipeline, see How HAProxy actually works in production.

What this means

Every request HAProxy proxies needs a connection slot on a backend server. Slots are bounded by maxconn, which HAProxy enforces at four independent levels: global, frontend, backend, and per-server. When the level that applies to a request is full, the request is not rejected immediately. It enters a queue and waits.

There are two queue scopes:

  • Per-server queue: requests waiting for a specific server to free a slot. Session persistence (cookie or stick-table based) pins requests to a server, so one hot server can build a queue while its peers sit idle.
  • Per-backend queue: requests waiting because the backend as a whole has no free slot anywhere.

By default, maxqueue is 0, which means the queue is unbounded. Requests wait until a slot frees up or until a timeout fires. The relevant timeout is timeout queue, and if you have not set it explicitly, it inherits the value of timeout connect. That default surprises people: a 10-second connect timeout means requests can sit in the queue for 10 seconds before HAProxy drops them with a 503. When maxqueue is set to a positive value and the queue reaches that depth, new requests no longer wait. Per the configuration manual, overflowed requests are redispatched to other servers, which breaks persistence.

The important operational property: queue buildup is a leading indicator. It precedes latency complaints, it precedes 5xx errors, and it precedes backend collapse. A backend with qcur oscillating between 0 and 20 during peaks is one traffic bump or one failed server away from an incident.

flowchart LR
  R[Incoming request] --> S{Free server slot?}
  S -->|yes| C[Connect or reuse connection]
  S -->|no| Q[Queue: qcur increments]
  Q --> W{Slot frees before timeout?}
  W -->|yes| C
  W -->|no, timeout queue expires| E[503 to client]
  Q --> M{maxqueue reached?}
  M -->|yes| RD[Redispatch to another server]
  C --> B[Backend server]

Common causes

CauseWhat it looks likeFirst thing to check
Traffic volume genuinely exceeds provisioned capacityqcur rises and falls with daily traffic peaks; scur/slim near 100% on all serversPer-server scur vs slim; compare current req_rate to historical baseline
Backend servers got slowerrtime climbing, connections held longer, slots turn over more slowly, queue formsPer-server rtime vs baseline; downstream dependencies (DB, cache)
Lost server capacityOne or more servers DOWN, DRAIN, or in maintenance; survivors saturate and queueact count on the BACKEND row and per-server status
One hot server from persistenceSingle server has high qcur while others are idle; sticky sessions funnel trafficPer-server qcur and scur side by side
Per-server maxconn set too lowQueue forms at modest request rates; backend app reports it could handle moreslim on server rows vs what the application actually supports
Thundering herd after reload or restartqcur spikes right after a reload, connection pool cold, ctime briefly nonzero everywhereUptime_sec from show info; did a reload just happen?

Quick checks

All of these are read-only against the runtime API socket. Adjust the socket path for your deployment.

# Current and peak queue depth per backend and per server
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" {print $1"/"$2": qcur="$3" qmax="$4}'

# Queue time (ms, rolling average over last 1024 requests)
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" {print $1"/"$2": qtime="$59"ms"}'

# Session utilization: are servers actually at their maxconn?
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" && $7>0 {print $1"/"$2": scur="$5" slim="$7" pct="int($5/$7*100)"%"}'

# Server status and how long since the last state change
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" && $2 != "BACKEND" {print $1"/"$2": status="$18" lastchg="$24"s"}'

# Active server count per backend
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 == "BACKEND" {print $1": active="$20" backup="$21}'

# Response time per server (are slow servers causing the pile-up?)
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" {print $1"/"$2": rtime="$61"ms"}'

# Is HAProxy itself saturated, or just the backends?
echo "show info" | socat unix-connect:/var/run/haproxy.sock stdio | grep -E "^(Idle_pct|CurrConns|Maxconn|Uptime_sec):"

How to diagnose it

  1. Confirm the queue is real and scoped. Run the first command above. Note whether qcur is nonzero on the BACKEND row, on individual SERVER rows, or both. Backend-level queue with idle servers underneath means requests are pinned (persistence) or the balancing algorithm is not spreading load. A queue on exactly one server is a hot-server problem, not a capacity problem.

  2. Check whether slots are actually full. A queue only forms when scur has reached slim somewhere. If scur/slim is at 100% on all servers, the queue is legitimate backpressure: you need more slots or faster turnover. If servers are queuing well below their slim, something else is throttling dispatch, so check the backend-level slim and global Maxconn too. Remember maxconn is enforced at four levels independently; see HAProxy maxconn reached for the global case.

  3. Determine whether the problem is arrival rate or service time. Compare current req_rate against the baseline for this time of day. If arrival rate is normal but the queue formed anyway, look at rtime: slower responses hold slots longer, so the same request rate consumes more concurrency. This is the backend timeout cascade pattern: rtime up, qcur up, econ low, servers still UP. The fix is on the backend, not in HAProxy.

  4. Check for lost capacity. A single server going DOWN shifts its share of traffic onto survivors. Look at status and act. If a server recently went DOWN (lastchg small) and the queue appeared at the same time, you are watching a capacity-concentration event. If the survivors are near their limits, one more failure cascades.

  5. Rule out a reload artifact. Check Uptime_sec. Right after a reload, the backend connection pool is cold, every request pays a fresh connect (brief ctime spike), and stick tables start empty unless you sync them via peers. A short-lived queue spike in the first minute after a reload is expected; a queue that persists past warmup is not.

  6. Decide what the queue is doing to clients. Read qtime. If qtime is a few milliseconds and the queue drains between bursts, the backpressure mechanism is working as designed. If qtime is a meaningful fraction of timeout queue (or timeout connect if timeout queue is unset), clients are about to start seeing 503s.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
qcur (per-server and per-backend)Instantaneous queue depth; the leading indicator itselfAny sustained nonzero value
qmaxPeak queue depth since stats reset or reload; tells you how bad it got when nobody was lookingqmax growing day over day while qcur looks fine now
qtimeAverage ms spent in queue over the last 1024 requests; smooths spikes but quantifies client impactSustained nonzero, or a large fraction of timeout queue
qlimitConfigured maxqueue per server; blank/zero means unboundedQueue approaching qlimit means 503s are imminent
scur / slimSlot utilization; queue only forms at 100%Sustained > 80% on all servers in a backend
rtimeSlow servers hold slots longer, shrinking effective capacityRising trend, or one server far above its peers
act / server statusLost servers concentrate traffic on survivorsact below half the pool with qcur nonzero
hrsp_5xx (frontend)Queue timeouts and maxqueue overflows surface here as 503s503 rate rising after a period of nonzero qcur

Alert on qcur as a TICKET-level signal when it is sustained nonzero, and treat qmax trending upward over weeks as a PLAN-level capacity signal. Page when the queue is producing 503s: frontend 503 rate above a small percentage of req_rate with qcur > 0, held for a few minutes. The full severity model for these signals is in the HAProxy monitoring checklist.

Fixes

Backend is genuinely undersized

If arrival rate is normal, servers are healthy, rtime is at baseline, and scur/slim is pegged, you simply need more capacity.

  • Add servers to the backend. The durable fix. Size for N+1: with one server removed, the rest should handle peak without queuing.
  • Raise per-server maxconn. Only if the application behind the server actually has headroom. Raising maxconn past what the app can serve converts an orderly HAProxy queue into an uncontrolled pile-up inside the application, which is harder to observe and recover from. Set per-server maxconn at or below the backend’s own connection limit.
  • Improve connection reuse. With http-reuse enabled, HAProxy sends new requests over idle persistent backend connections instead of opening fresh ones, so each slot carries more work. If reuse is collapsing (backend sending Connection: close, HTTP version downgrade), fixing it recovers capacity without adding anything.

Backend got slower

If rtime is climbing, the queue is a symptom. HAProxy-side changes only buy time.

  • Fix the backend latency. Database regression, GC pauses, saturated downstream dependency. Per-server rtime comparison tells you whether it is one server or the whole pool.
  • Set timeout queue explicitly. If it is unset, it inherits timeout connect, which is often far longer than you want clients waiting for a slot. A shorter queue timeout fails fast and sheds load instead of letting an unbounded queue amplify the slowdown. Tradeoff: queued requests become 503s sooner, so you are choosing fast failure over slow success.
  • Set maxqueue as a circuit breaker. A bounded queue plus redispatch keeps one saturated server from accumulating an infinite wait line. The documented tradeoff: redispatch breaks persistence, so sticky-session users land on a different server. If persistence is load-bearing, weigh that carefully.

Lost capacity or hot server

  • Restore or replace the failed server. If a server is flapping, put it in MAINT to stop traffic oscillating onto a sick instance.
  • For a persistence-driven hot server, check whether a small set of clients (a NAT gateway, a single heavy account) is pinned to one server. Rebalancing the stickiness key or the balancing algorithm addresses the skew; raising capacity does not.

What not to do

Do not reload or restart HAProxy to clear a queue. The queued connections belong to clients, the queue rebuilds in seconds if the capacity problem is real, and the reload resets your stats counters, drops warm backend connections, and destroys the evidence you need for diagnosis.

Prevention

  • Monitor both queue scopes continuously. Per-backend qcur alone hides the single-hot-server case; per-server qcur alone hides whole-pool saturation. Collect both, plus qmax and qtime. Queue monitoring sits at Level 3 of the HAProxy monitoring maturity model: if you are not watching it, you are flying without your earliest saturation signal.
  • Set timeout queue deliberately. Do not inherit timeout connect by accident. Pick a value that reflects how long a client should reasonably wait for a slot.
  • Decide on a queue policy. Unbounded (maxqueue 0) means slow degradation then timeout errors. Bounded means fast failure and redispatch with a persistence tradeoff. Either is defensible; accidental is not.
  • Capacity-plan with N+1. Track qmax and peak scur/slim over weeks. If losing one server would push survivors into queueing at peak, you are already short.
  • Treat persistent qcur as a ticket, not background noise. In a correctly sized system, steady-state queue depth is zero.

How Netdata helps

  • Per-second qcur, qmax, and qtime collection per backend and per server, so short queue bursts that a 60-second scrape interval would average away are still visible.
  • Queue depth correlated with slot utilization (scur/slim) on the same dashboard, which answers the first diagnostic question (are slots actually full?) without switching tools.
  • Queue signals next to rtime and server status, so you can tell at a glance whether the queue is a capacity problem, a slowness problem, or a lost-server problem.
  • Anomaly detection on qcur and qtime catches the slow drift (queue depth creeping up week over week) that fixed zero-threshold alerts miss until it becomes an incident.
  • Frontend 5xx alongside queue metrics, making the queue-to-503 progression visible as a single story rather than two unrelated alerts.
The Netdata solution

HAProxy load balancer monitoring with Netdata

Netdata monitors HAProxy with per-second frontend, backend, and queue metrics plus ML-powered anomaly detection. Correlate maxconn saturation, queue buildup, health-check cascades, 5xx attribution, and file-descriptor exhaustion against the backend and host signals behind them, so you catch the incidents in these runbooks before they page anyone.