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-504-gateway-timeout

Operations Guides

HAProxy 504 Gateway Timeout: timeout server and the backend timeout cascade

Your frontend error rate jumps. Clients report “504 Gateway Timeout.” HAProxy looks alive: the process is running, servers are UP, health checks are green. Yet requests are dying on a timer.

This is the backend timeout cascade, and the 504 is its final symptom. The servers are reachable (TCP accepts succeed), but the application behind them has slowed past the timeout server budget. HAProxy holds the client connection, waits, gives up, and generates a 504 itself.

The key distinction: a 504 from HAProxy is almost never a connectivity problem. It is a “server accepted the connection but never answered in time” problem. That separates it from 503 (no server available, saturation, or queue overflow) and 502 (connect refused or a broken/truncated response). Getting that distinction right is the difference between debugging the network and debugging the application.

What this means

timeout server is the maximum inactivity time HAProxy tolerates on the server side of a proxied connection. In HTTP mode its most important role is the first phase of the response: the time the server takes to send response headers. That interval directly represents how long the backend application spent processing the request. When the timer fires, HAProxy aborts the server-side connection and returns 504 to the client. If timeout server is never set, the timeout is effectively infinite and HAProxy warns at startup, so a hung backend can hold connections forever.

The cascade builds like this: the application (or its database, cache, or downstream API) slows down. Each slow request holds a server connection slot longer. Servers stay UP because TCP accepts succeed and health checks may still pass. New requests have no free slot, so they queue (qcur rises, qtime grows). Response time (rtime) climbs toward timeout server. Once enough requests cross the threshold, timeout server starts firing and 504s appear on the frontend. The queue keeps filling because the backend is not recovering. Left alone, this degrades into the backend collapse pattern as health checks start failing under load.

flowchart TD
  A[Backend dependency slows] --> B[App threads held, rtime climbs]
  B --> C[Server slots stay busy]
  C --> D[qcur rises, requests queue]
  D --> E[Requests exceed timeout server]
  E --> F[HAProxy emits 504]
  C --> G[Health checks still pass, servers UP]
  G --> D
  F --> H[If unchecked: health checks fail, backend collapse]

Two related timers produce different errors, so do not confuse them. timeout connect governs establishing the TCP connection to the server; when it fires you typically see 503 or 504 with rising econ. timeout http-request governs how long HAProxy waits for the client to send a complete request, and produces a 408, not a 504. If you are seeing 408s, you are in idle-connection territory, not backend-timeout territory.

Common causes

CauseWhat it looks likeFirst thing to check
Backend application or dependency slowdownrtime rising on all servers in the backend, econ low, qcur growingPer-server rtime; backend’s database/downstream latency
timeout server too small for real p99 latencySteady trickle of 504s on legitimately slow endpoints, rtime healthy otherwiseLog timing fields for the 504’d requests vs timeout server
One slow server dragging the poolOne server’s rtime far above peers, errors correlate with that serverPer-server rtime comparison
Connection saturation masquerading as timeoutsscur near slim, qcur high, rtime normalscur/slim at global, frontend, backend, and server levels
timeout connect firing (not timeout server)econ rising, ctime near timeout connect, 503/504 mixctime and econ deltas
WebSocket/tunnel traffic hitting the wrong timer504s only on upgraded connectionstimeout tunnel, which supersedes timeout server after upgrade

Quick checks

# Per-server and per-backend response time, queue depth, and errors
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" {print $1"/"$2": status="$18" qcur="$3" econ="$14" eresp="$15" rtime="$61"ms 5xx="$44}'

# Session utilization at every level (rule out saturation)
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '{if($7>0) print $1"/"$2": scur="$5" slim="$7" pct="int($5/$7*100)"%"}'

# Frontend vs backend 5xx: is HAProxy generating the errors?
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '{print $1"/"$2": 5xx="$44}'

# Retries and redispatches: is HAProxy masking instability?
echo "show stat" | socat unix-connect:/var/run/haproxy.sock stdio | \
  awk -F, '$2 != "FRONTEND" {print $1"/"$2": wretr="$16" wredis="$17}'

Then confirm in the logs. With option httplog, the termination flags tell you exactly which timer fired:

  • sH means timeout server fired before the server returned response headers. This is the classic 504 signature and the most common anomaly; the manual describes it as typically caused by server or database saturation.
  • sD means the server stopped sending or acknowledging data mid-response, during the data phase. Different failure: headers arrived, then the transfer stalled.
  • sC means timeout connect fired; the connection to the server never completed. In HTTP mode this can surface as 503 or 504.

The log timing fields confirm the mechanism: Tr is the time spent waiting for the server to send a full response (excluding data transfer). When 504’d requests show Tr values at or just past timeout server, the backend simply did not answer in time.

How to diagnose it

  1. Confirm HAProxy is the one generating the 504s. Compare frontend hrsp_5xx rate against the sum of backend hrsp_5xx rates. If frontend 5xx is well above backend 5xx, HAProxy is synthesizing the errors (timeouts, no-server 503s). If they are nearly equal, the backends are returning the errors themselves and this is an application incident, not a timeout incident.

  2. Read the termination flags. Grep your HAProxy logs for sH vs sD vs sC. sH means the server never sent headers in time; sD means the response stalled mid-body; sC means you are actually looking at a connect problem. Do not tune timeout server for an sC problem.

  3. Check per-server rtime. Is every server in the backend slow, or just one? All servers slow points to a shared dependency (database, cache, downstream API). One server slow points to that host: GC pauses, disk, a bad deploy on a canary.

  4. Verify econ is low. The timeout cascade signature is “servers UP, econ low, rtime climbing.” If econ is rising with ctime near timeout connect, you have a reachability or SYN-queue problem instead. If econ is low but eresp is rising, servers are dying mid-response, which is closer to 502 territory.

  5. Assess the queue. Nonzero, growing qcur with rising qtime means every server slot is held by slow requests. Express qtime against your timeout budget: if timeout server is 30s and qtime is 15s, half of a request’s budget is gone before it reaches a server, so even healthy rtime values will tip it into 504.

  6. Rule out saturation. Check scur/slim at all four levels (global, frontend, backend, per-server). If scur is pinned at slim with normal rtime, the bottleneck is admission, not speed; that is the maxconn exhaustion pattern, and raising timeout server will make it worse by holding doomed requests longer.

  7. Size the timeout against reality. Pull Tr for successful slow requests from the logs and compare the distribution’s tail against timeout server. If your legitimate p99 is 25s and timeout server is 30s, any minor degradation produces 504s. The timeout should sit above real p99 with headroom, not at the mean.

  8. Investigate the backend dependency. The proxy has told you everything it can: the answer to “why is rtime climbing” lives in the application, its database, or its downstream calls. Shift to those signals.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Per-server rtimeDirect view of backend processing time; the cascade’s first moverRising past 2x baseline, or above 50% of timeout server
qcur / qtimeRequests waiting for a free slot; appears before any errorAny sustained nonzero value
Frontend minus backend 5xx deltaIsolates HAProxy-generated errors (503/504) from app errorsDelta rising while backend 5xx is flat
econRules connectivity in or outRising with high ctime (connect problem, not server timeout)
erespServer died or stalled mid-responseRising; often pairs with sD log flags
wretr / wredisHAProxy masking instability before users see itSustained nonzero rate
scur / slimDistinguishes timeout cascade from saturationRatio above 80-90%
Log termination flags sH/sD/sC and TrDefinitive record of which timer fired and how long the server tookTr clustered at timeout server

Fixes

Slow backend or dependency

This is the majority case and the fix is not in HAProxy. Reduce load or restore the dependency: kill the expensive query, scale the app tier, shed traffic. HAProxy-side, per-server maxconn set to what the application can actually handle creates backpressure and converts a silent pile-up into visible queuing earlier, which is easier to alert on than 504s. If some servers are healthy and some are hung, put the hung ones in MAINT via the runtime API to stop HAProxy feeding them while you investigate.

Timeout sized wrong

If legitimate requests genuinely take longer than timeout server (report generation, large exports, slow search), raise the timeout for those routes rather than globally. http-request set-timeout, introduced in HAProxy 2.4, lets you adjust timeout server per request via ACLs, so you can give /report 120s while keeping the default at 30s. The tradeoff of any increase: slow requests hold server slots and frontend connections longer, so the queue grows deeper before errors surface. Raising a timeout to mask a slow backend trades 504s for resource exhaustion. Treat timeout server as an SLO enforcement mechanism, not a dial to make errors disappear.

WebSocket and tunnel traffic

Once a connection upgrades to a tunnel, timeout tunnel supersedes both timeout client and timeout server. If your 504s are confined to WebSocket connections that established successfully, tune timeout tunnel, not timeout server. A precedence issue reported against HAProxy 2.2.x (haproxy issue #2280) shows that backend-level timeout tunnel does not always override defaults for WSS connections, so verify that your tunnel timeout is actually applied.

One more caveat: slow uploads

There is a long-standing report of timeout server firing mid-upload at exactly its configured value even while data is actively flowing from a slow client, producing intermittent 504s on large uploads (haproxy issue #949). The reported workaround was raising timeout server substantially. If your 504s correlate with large request bodies from slow clients and the termination flag is sD, this pattern is a candidate explanation.

Prevention

  • Set timeouts explicitly, everywhere. An unset timeout server is infinite, with only a startup warning to tell you. Pick a value from measured p99 latency plus headroom, not a round number copied from a default config. If you still have srvtimeout, contimeout, or clitimeout in old configs, replace them with timeout server, timeout connect, and timeout client; the old directives are deprecated.
  • Alert on the cascade, not just the 504. Page when servers are UP, qcur > 0, rtime > 2x baseline, and frontend 5xx exceeds about 1% of requests, sustained for 5 minutes with a traffic floor. That catches the cascade minutes before users do.
  • Watch the leading signals as tickets. Per-server rtime deviation, nonzero qtime, and any sustained wretr/wredis rate all precede the first 504. None of them require an error to fire.
  • Keep log timing fields and termination flags. The stats CSV gives you rolling 1024-sample averages, which smooth out exactly the tail behavior that produces 504s. Per-request Tr and termination flags in logs are where the proof lives. Also monitor DroppedLogs; losing logs mid-incident removes your best evidence.
  • Handle counter resets. hrsp_5xx, econ, and friends reset on every reload. Gate alerts on Uptime_sec so a reload does not look like a recovery or a fresh spike.

How Netdata helps

  • Netdata collects the HAProxy stats CSV continuously, so per-server rtime, qcur, econ, eresp, and scur/slim are charted together rather than sampled by hand during the incident.
  • The frontend vs backend 5xx split is visible on separate charts, making the “is HAProxy generating these errors?” question a glance instead of a computation.
  • Correlating rtime climbing against flat econ and UP server status on one dashboard surfaces the timeout cascade signature directly, and distinguishes it from saturation (scur at slim) and connect failures (econ rising).
  • Anomaly detection on per-server rtime flags the single slow server in a pool before the average moves enough to notice.
  • Because counters reset on reload, continuous collection with proper counter handling avoids the phantom drops and spikes that mislead rate-based diagnosis.
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.