惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
V
V2EX
博客园_首页
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
T
Troy Hunt's Blog
T
Tenable Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recorded Future
Recorded Future
F
Fortinet All Blogs
D
DataBreaches.Net
B
Blog
T
Threat Research - Cisco Blogs
MyScale Blog
MyScale Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Best practices for monitoring and remediating connection churn
Nicholas Thomson, Guy Arbitman · 2024-09-18 · via Datadog | The Monitor blog

Elevated connection churn can be a sign of an unhealthy distributed system. Connection churn refers to the rate of TCP client connections and disconnections in a system. Opening a connection incurs a CPU cost on both the client and server side. Keeping those connections alive also has a memory cost. Both the memory and CPU overhead can starve your client and server processes of resources for more important work. Furthermore, a TCP or TLS connection makes several round trips between client and server, adding latency to any API request that creates a new connection. Because of these risks, connection churn is an important metric to watch for teams trying to ensure high performance and lower overhead cost.

A potential sequence of events that can arise as a result of connection churn
Connection churn often causes resource pressure on your system.
A potential sequence of events that can arise as a result of connection churn

Engineers are not always able to easily understand that an issue they’re encountering (e.g., increased latency or a networking failure) is due to connection churn, or where exactly in their distributed system the connection churn is occurring. To detect elevated connection churn, it’s important to gather monitoring data on all of your distributed services. Once you’re collecting this telemetry, there are a number of best practices—such as tracking the number of established and closed connections, and monitoring the latency of TCP sockets—that will help you detect and troubleshoot connection churn, as well as determine its root cause.

In this post, we’ll show you:

  • The common symptoms of connection churn

  • The causes of connection churn and how to troubleshoot them

  • How to use Datadog to monitor and pinpoint the root cause of connection churn in a distributed system

What are common symptoms of connection churn?

When there are issues impacting your system, it can be difficult to determine whether connection churn is behind them. Here are some key indicators to look out for that can alert you early on that you may be experiencing connection churn, so you can investigate the issue further.

Elevated TCP socket latency

TCP socket latency refers to the time delay experienced during the transmission of data over a TCP connection. High socket latency can indicate that system resources are being exhausted due to the rapid opening and closing of connections. This can slow down connection establishment as the system struggles to manage the high churn rate. High connection churn can also lead to increased timeouts in TCP connections, which can in turn result in increased latency. As such, latency spikes can be a telltale sign that excessive connection creation and termination are leading to performance degradation and resource issues.

Request bottlenecks

Connection churn can lead to request bottlenecks in a system due to the overhead associated with repeatedly creating and closing network connections. Request bottlenecks can cause the system to become slow at handling additional incoming requests, reducing the overall request processing capacity. This can have a cascading impact—for example, it may cause downstream services to experience latency or even failure due to the upstream service experiencing the bottleneck.

To identify bottlenecks, you need to monitor health metrics for each component of your data pipeline, such as throughput, processing latency, and error rate. You’ll want to establish what a healthy, consistent baseline is for these metrics so that you’ll be able to detect a spike indicative of a bottleneck.

Decreased throughput

Connection churn can reduce the overall throughput of a system because repeatedly establishing connections consumes time and resources that would otherwise be used for data transfer. For example, each new connection typically requires a handshake process, such as a TCP three-way handshake or an SSL/TLS handshake.

With high churn, a significant portion of the system’s processing power is spent on these overhead operations rather than on actual data transmission, reducing overall throughput. Additionally, every time a connection is opened or closed, the server must perform setup and teardown operations, such as allocating and freeing memory, managing session states, and handling encryption keys. High churn means these operations are performed repeatedly at a higher-than-usual rate, consuming resources that would otherwise be available for processing and transmitting data.

What are the causes of connection churn?

Connection churn can affect systems for a number of different reasons. In order to troubleshoot connection churn, it’s important to first understand the root cause. The following are common causes of connection churn and suggestions for how to troubleshoot each of them.

A spike in users

A spike in users is often a good thing for a company—it can occur during Black Friday sales or new feature releases, for example. But such spikes can also result in connection churn because the load is too high for the current number of servers. If you are experiencing a surge of new users, you should consider monitoring your new connections to stay ahead of potential connection churn caused by the surge.

Scaling up—i.e., adding more servers to handle the connection— will bring down TCP socket latency and alleviate the problem. Alternatively, you can spread the load more evenly between servers by using load balancers (e.g., HAProxy, Istio, Envoy, or NGINX) to reduce the impact of the increased load on a specific server instance or replica.

A misconfigured client service

There are a number of different service misconfigurations that can lead to connection churn. For instance, a network misconfiguration or firewall could be unintentionally preventing network communication, or low timeout settings could be causing sessions to expire too quickly, leading to frequent reconnections.

If a service is misconfigured or incompatible with other systems in a workflow, it may result in unreliable performance or frequent downtime, which can cause user connections to that service to churn. There are a number of signals that could indicate a misconfigured service is causing connection churn. A spike in TCP socket latency, combined with a discrepancy between established and closed connections, could point toward an issue with your service’s timeout settings. Additionally, if you’ve made a recent deployment or update to the service that’s experiencing connection churn, this could suggest that the recent change introduced a misconfiguration.

To determine whether connection churn is a result of a misconfigured service, start by checking for application errors that cause disconnections, such as server timeouts. If timeouts are found, this suggests that the issue may be due to misconfigured timeout settings.

Alternatively, you can check for client code that automatically tries to reconnect when it encounters a TCP failure of any sort. If the TCP failure happens before the connection is even made (or very early on in the protocol exchange), then the client can go into a near-busy loop, constantly making connections. If you discover that the client code is misconfigured to automatically retry, you can implement exponential backoff instead, so that you immediately reconnect when the first connection fails. If it fails again within a short time (e.g., 30 seconds), then the client will wait two seconds before reconnecting. If the connection fails again within 30 seconds, the client will wait four seconds, and so on.

Additionally, you should ensure that you have enabled connection pooling. Connection pooling is a technique used to manage connections in a way that improves performance and resource utilization. Instead of opening and closing a new connection for each operation, connection pooling maintains a cache of active connections that can be reused by the application, thus reducing the overhead associated with establishing new connections. If you’re using an HTTP API or a database, there’s a good chance there are settings to enable connection pooling.

Finally, if your services are experiencing high connection churn, it might be because they need to be behind an easily scalable load balancer (e.g., HAProxy for regular APIs, or PgBouncer for PostgreSQL). Load balancers can help prevent connection churn by distributing incoming traffic more evenly across multiple servers, ensuring efficient use of resources and maintaining stable connections.

Use Datadog to monitor and pinpoint the root cause of connection churn in a distributed system

Monitoring distributed services for signals of connection churn can be challenging without a unified monitoring platform. Datadog Network Performance Monitoring (NPM) and Universal Service Monitoring (USM) are two technologies that make monitoring connection churn much easier for users.

Both NPM and USM rely on eBPF, which helps simplify the process of collecting and monitoring these types of metrics. eBPF technology enables NPM and USM to monitor kernel events, such as network traffic and disk I/O, without the customer needing to change or redeploy their application. Using eBPF, NPM is able to track the kernel TCP methods and get information about every established and closed connection, including latency, the round trip time, the error rate, and more.

NPM enables you to easily track the number of established connections and closed connections. You can also use NPM to monitor latency over TCP sockets and alert you if a TCP network metric crosses a certain threshold.

Use Datadog NPM to root cause connection churn.

Additionally, NPM gives you context to help determine what the cause of connection churn is. For instance, you might see an increase in connection churn to server:X, group traffic by client service, and identify a client service that’s unexpectedly churning connections.

If connection churn can’t be traced to a service you own, you can pivot to USM to obtain RED metrics (request, error, and duration) from all your services, allowing you to search elsewhere for the cause.

Datadog USM provides RED metrics to help you troubleshoot connection churn.

Monitor your services for connection churn

Connection churn can cause issues such as latency and service failure that can cascade up or downstream in the pipeline. It takes time, effort, and a comprehensive monitoring strategy to trace the root cause of an issue—such as an unresponsive service or a network connection issue—to connection churn, especially in a distributed system at scale.

In this post, we broke down the common causes of connection churn and provided examples of how to troubleshoot them. We also explained how Datadog makes it easy to monitor and root-cause connection churn using USM and NPM, which rely on eBPF to provide kernel-level insights into events taking place in your environment.

Check out our NPM and USM documentation to get started monitoring connection churn across your system. If you’re new to Datadog, sign up for a 14-day free trial.