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 / traefik / traefik-timeout-chain-502 ▌

Operations Guides

Traefik intermittent 502 behind a load balancer: the timeout chain mismatch

Some percentage of requests behind your cloud load balancer return 502. Not all of them, just a low-grade drip: one in a few hundred, sometimes one in a few thousand. Backend logs show nothing. Traefik logs show a burst of 502s with no corresponding backend error. Load balancer health checks are green. Everything looks healthy, and users keep hitting errors.

This is the classic signature of a keep-alive idle timeout mismatch in the chain client -> load balancer -> Traefik -> backend. Somewhere in that chain, a component is reusing a connection that the next hop has already closed. The request is written into a half-dead socket, the other side answers with a TCP reset, and the proxy reports 502 Bad Gateway. Because it only happens when a request lands on an idle connection at the wrong moment, it is intermittent, load-dependent, and hard to reproduce.

The fix is not a flag you flip in one place. It is making the timeout chain coherent: at every hop, the side that reuses pooled connections must close them before the peer does. This article walks through the mechanism, how to confirm it, and how to set Traefik’s respondingTimeouts and forwardingTimeouts so the resets stop.

What this means

Reverse proxies reuse backend and frontend connections via HTTP keep-alive. That reuse is what makes proxying cheap: no TCP handshake, no TLS handshake, no slow start per request. But keep-alive creates a race. Each side of a connection has its own idle timeout, and neither side tells the other when it is about to close. If side A’s timeout is shorter than side B’s, there is a window where side B still considers the connection usable while side A has already closed it. When side B reuses that connection, it gets a reset.

With Traefik behind a cloud load balancer, there are two such races:

  1. LB to Traefik. The cloud LB holds idle keep-alive connections to Traefik. If the LB’s idle timeout is longer than Traefik’s entryPoints.<name>.transport.respondingTimeouts.idleTimeout, Traefik closes the connection first. The LB then sends a client request down the dead connection and gets a reset. Most LBs translate that into a 502 to the client. This is the most common break, and it produces 502s at the load balancer that never appear in Traefik’s own access logs.

  2. Traefik to backend. Traefik pools backend connections. If the backend’s keep-alive timeout is shorter than or equal to Traefik’s serversTransport idle connection timeout, the backend closes first and Traefik writes into the dead socket. This time Traefik itself returns the 502, and it does show up in Traefik’s metrics and logs.

In both cases the application is fine. The failure is entirely at the transport layer, which is why application logs are empty.

flowchart LR
  C[Client] -->|"keep-alive"| LB[Cloud LB
idle timeout 60s] LB -->|"keep-alive"| T[Traefik
idleTimeout 180s] T -->|"pooled conns"| B[Backend
keep-alive timeout] T -.->|"idleTimeout shorter than LB idle timeout:
Traefik closes first, LB reuses dead conn, RST -> 502"| X[Intermittent 502] B -.->|"backend timeout shorter than Traefik idleConnTimeout:
Traefik reuses dead conn, RST -> 502"| X

The rule that keeps the chain safe: at each hop, the side that initiates and reuses connections must have the shorter idle timeout, so it always retires connections on its own timer instead of discovering the peer already closed them. Concretely:

  • LB idle timeout < Traefik respondingTimeouts.idleTimeout
  • Traefik forwardingTimeouts.idleConnTimeout < backend keep-alive timeout

This guarantees the side holding pooled connections (LB toward Traefik, Traefik toward backend) always sees the connection closed by its own timer, never by the peer mid-reuse.

Common causes

CauseWhat it looks likeFirst thing to check
LB idle timeout > Traefik respondingTimeouts.idleTimeout502s recorded at the LB, nothing in Traefik access logs, all backends healthyCompare LB idle timeout setting to Traefik’s entrypoint idleTimeout
Backend keep-alive timeout <= Traefik forwardingTimeouts.idleConnTimeout502s in Traefik service metrics, empty backend application logsCompare backend server keep-alive setting to Traefik’s idleConnTimeout
Equal timeouts on both sides of a hopVery low 502 rate that scales with idle-period traffic, worst at low QPSLook for timeouts set to the same value “for symmetry”
GCP HTTPS LB in front of TraefikSame LB-side pattern, but the LB keep-alive timeout is a fixed 600s you cannot changeConfirm which GCP LB product fronts Traefik, then set Traefik’s idleTimeout above 600s
Backend closes connections mid-flight (crash, deploy, config reload)502s correlated with deploys or reload events, not with idle gapsCorrelate 502 timestamps with deploy and reload times

Quick checks

All read-only.

# 1. Pull Traefik's current timeout configuration from the API
curl -s http://localhost:8080/api/rawdata | python3 -m json.tool | grep -iA5 -e respondingTimeouts -e forwardingTimeouts

# 2. Entrypoint-level vs service-level 5xx: are the 502s even reaching Traefik?
curl -s http://localhost:8080/metrics | grep 'traefik_entrypoint_requests_total' | grep 'code="5'
curl -s http://localhost:8080/metrics | grep 'traefik_service_requests_total' | grep 'code="5'

# 3. Check retry activity: retries masking connection resets
curl -s http://localhost:8080/metrics | grep traefik_service_retries_total

# 4. Inspect TCP connection states around Traefik (CLOSE_WAIT buildup hints at peer-closed sockets)
#    Needs root (or sudo) for the -p process column
sudo ss -tnp | grep traefik | awk '{print $1}' | sort | uniq -c

# 5. Cloud LB error metrics: check the LB's own target-response/5xx counters
#    (AWS: CloudWatch HTTPCode_ELB_5XX_Count vs HTTPCode_Target_5XX_Count;
#     a high ELB_5XX with low Target_5XX points at the LB-to-Traefik hop)

Check 1 assumes the API is enabled on the dashboard entrypoint. Adjust the port and address to your deployment. If the API is not enabled, read the static configuration file or the startup flags instead.

How to diagnose it

  1. Locate which hop generates the 502. Compare 502 counts at three points: the load balancer’s own metrics, Traefik’s entrypoint metrics, and Traefik’s service metrics. If the LB reports 502s that never appear in Traefik’s entrypoint counters, the failure is on the LB-to-Traefik hop. If Traefik’s service metrics show the 502s, the failure is on the Traefik-to-backend hop. If both, you may have both races. See telling Traefik-generated errors from backend errors for the general method.

  2. Check the pattern against idle behavior. The timeout-mismatch 502 has a distinctive fingerprint: it hits requests that follow an idle gap on a pooled connection. At high sustained QPS the rate drops toward zero because connections never sit idle long enough to be closed. At low or bursty QPS the rate climbs. If your 502 rate is inversely correlated with throughput, you are almost certainly looking at an idle-timeout race. Constant-rate 502s that track throughput point elsewhere: see Traefik 502 Bad Gateway.

  3. Read the actual timeout values. From the LB side: AWS ALB defaults to a 60-second idle timeout (configurable up to 4000 seconds). GCP’s external HTTPS load balancer uses a fixed 600-second keep-alive timeout to backends that cannot be changed. Azure Front Door documents a 90-second HTTP keep-alive timeout and an origin response timeout configurable between 16 and 240 seconds. Verify against your provider’s current documentation, since these are platform behaviors that change.

  4. Read Traefik’s values. In Traefik v3, entryPoints.<name>.transport.respondingTimeouts.idleTimeout defaults to 180s, and http.serversTransports.<name>.forwardingTimeouts.idleConnTimeout defaults to 90s. Other forwardingTimeouts defaults: dialTimeout 30s, responseHeaderTimeout 0s (disabled). Defaults have shifted across releases, so never assume them: dump the running config (check 1 above) and read the actual values. If you run Traefik v2, its docs list entrypoint readTimeout as 0s (disabled) and idleTimeout as 180s; the forwarding defaults above are also 30s, 0s, and 90s.

  5. Compare the pair at each hop. For the LB hop: LB idle timeout must be less than Traefik’s idleTimeout. For the backend hop: Traefik’s idleConnTimeout must be less than the backend’s keep-alive timeout (for example nginx keepalive_timeout, or your application server’s equivalent). Flag any hop where the front side is longer than, or equal to, the back side. Equal values are a violation too: two timers expiring at the same moment still race.

  6. Rule out lookalikes. If 502s correlate with deploys or with traefik_config_reloads_total increments rather than with idle gaps, you are looking at backend churn or config-reload context cancellation, not a timeout mismatch. If backends flap on health checks, see Traefik 503 Service Unavailable. If the backend is alive but slow, see Traefik 504 Gateway Timeout.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
LB-generated 5xx vs Traefik entrypoint 5xxSeparates LB-side resets from Traefik-side resetsLB 5xx count exceeds Traefik entrypoint 5xx count
traefik_service_requests_total{code="502"} per serviceConfirms Traefik is generating the 502 on the backend hopLow-rate 502 drip with zero backend errors
502 rate vs request rate over timeThe idle-timeout race is inversely load-dependent502 ratio climbs at night or during traffic lulls
traefik_service_retries_totalRetries may be silently absorbing resets, hiding the real failure rateRetry rate above 1% of requests with flat client-visible errors
traefik_open_connections per entrypointShows pool churn and idle connection populationSawtooth pattern of connections expiring in lockstep with a timer

Fixes

Fix the LB-to-Traefik hop

Make Traefik’s idleTimeout comfortably longer than the LB’s idle timeout. For an AWS ALB at its 60-second default, the Traefik v3 default of 180s is already safe. The break appears when someone lowered Traefik’s idleTimeout below the LB’s, or when the LB idle timeout was raised (ALBs can go to 4000s).

# static config: entrypoint respondingTimeouts
entryPoints:
  websecure:
    address: ":443"
    transport:
      respondingTimeouts:
        idleTimeout: 660s   # longer than the LB idle timeout, with margin

For GCP’s HTTPS load balancer with its fixed 600-second keep-alive, you cannot lower the LB side, so raise Traefik’s idleTimeout above 600s. Operators report 650s as a working value, with the caveat that some still saw residual 502s and needed the backend-hop fix below as well.

Fix the Traefik-to-backend hop

Make Traefik’s idleConnTimeout shorter than the backend’s keep-alive timeout, with real margin (tens of seconds, not one second).

# dynamic config: serversTransport
http:
  serversTransports:
    default:
      forwardingTimeouts:
        idleConnTimeout: 45s   # shorter than backend keep-alive timeout

If the backend’s keep-alive timeout is 60s, a 45s idleConnTimeout means Traefik always discards the pooled connection before the backend would close it. The cost is a slightly higher rate of new backend connections, which is negligible compared to the cost of 502s.

Retry middleware as a partial mitigation

Traefik’s retry middleware reissues a request when a server does not reply and, unless disabled, when a TCP-layer transmission error occurs. That includes the reset-induced races where the pooled connection dies before a response arrives. A small retry count (attempts: 3) on idempotent routes will mask most residual races by re-sending the request over a fresh connection. Treat this as a safety net, not the fix: it hides the symptom and adds backend load. Also note the risk profile described in Traefik cascading backend failure: retries amplify load on a struggling backend.

What not to do

  • Do not disable keep-alive globally (for example maxIdleConnsPerHost: -1). That disables connection reuse entirely, makes idleConnTimeout irrelevant, and replaces cheap 502s with expensive per-request connection setup plus TIME_WAIT accumulation. At high throughput that can trade this problem for ephemeral port exhaustion; see Traefik cannot assign requested address.
  • Do not set both sides of a hop to the same value. Matching timers still race.
  • Do not raise timeouts without checking the whole chain. Raising Traefik’s idleTimeout above the LB’s while leaving the backend hop mismatched just moves the 502s to the other hop.

Prevention

  • Document the chain. Write down the idle timeout at every hop (client-side CDN, LB, Traefik entrypoint, Traefik serversTransport, backend server) in one place, in order, and enforce the strictly-decreasing-from-client rule in review.
  • Verify after upgrades and LB changes. Timeout defaults have changed across Traefik minor releases, and cloud LB defaults differ by product. Any upgrade of Traefik, the LB configuration, or the backend server is a reason to re-check the chain.
  • Alert on the ratio, not just the count. A low absolute 502 count hides at high traffic. Alert on 502s as a fraction of requests, and separately compare LB 5xx to Traefik entrypoint 5xx so a regression at either hop pages the right team.
  • Baseline the inverse-load fingerprint. If your overnight 502 ratio creeps up over weeks, a timeout somewhere has drifted. Catch it in the trend before a config change makes it obvious at the worst time.

How Netdata helps

  • Error-code breakdown per entrypoint and per service. Netdata charts Traefik’s Prometheus counters split by response code, so the LB-side vs Traefik-side 502 comparison from the diagnosis steps is a two-chart glance instead of a PromQL session.
  • Load-correlation view. Plotting 502 rate against request rate on one dashboard makes the inverse-load fingerprint of an idle-timeout race visible immediately, which is the fastest single discriminator for this failure mode.
  • Retry visibility. Netdata surfaces traefik_service_retries_total alongside request and error rates, so you can see retries silently absorbing resets before the client-visible 502 rate moves.
  • Connection population. Per-entrypoint open connections and process-level socket states show the sawtooth expiry pattern of a too-short idle timer.
  • Post-fix verification. After changing idleTimeout or idleConnTimeout, the 502 ratio and retry rate charts give you a clear before/after without waiting for user reports.