---
title: "Not just another network latency issue: How we unraveled a series of hidden bottlenecks"
description: "Recurring high-startup-latency pages on every deployment of Datadog's usage estimation `counter` service traced back to four stacked bottlenecks rather than one."
url: "https://swe.quest/articles/not-just-another-network-latency-issue-how-we-unraveled-a-series-of-hidden-cc3a7d83431d9610"
canonical: "https://www.datadoghq.com/blog/engineering/not-just-another-network-latency-issue/"
source: "Datadog Engineering"
published: "2023-05-26"
difficulty: "medium"
kind: "Incident"
reading_minutes: 8
tags: ["networking","debugging","performance","cloud","kubernetes"]
---

# Not just another network latency issue: How we unraveled a series of hidden bottlenecks

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2023-05-26, 8 min read, Incident. Original: [https://www.datadoghq.com/blog/engineering/not-just-another-network-latency-issue/](https://www.datadoghq.com/blog/engineering/not-just-another-network-latency-issue/)

## Summary

Recurring high-startup-latency pages on every deployment of Datadog's usage estimation \`counter\` service traced back to four stacked bottlenecks rather than one. The fixes were raising CPU for a throttled Envoy sidecar, patching a Linux kernel bug that pinned all traffic to the first of eight AWS ENA transmit queues, and moving to network-optimized EC2 instances after bandwidth-allowance-exceeded metrics revealed hypervisor packet drops. A Kubernetes preStop hook with a maintenance-mode key then kept Envoy from routing requests to terminating remote-cache pods. With p99 latency back under 100 ms, the team scaled the remote cache down 6x, saving hundreds of thousands of dollars a year, and now alerts on ENA bandwidth and pod- and host-level network drop metrics.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)

## Prerequisites

- TCP retransmits ([easy posts on Networking](https://swe.quest/tags/networking.md?difficulty=easy))
- Envoy sidecar proxies ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))
- Kubernetes pod lifecycle ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- AWS EC2 networking ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))

## Keywords

Envoy, AWS ENA, EC2, Linux kernel, preStop hook, Datadog Network Performance Monitoring

## Related posts

- [It’s always DNS . . . except when it’s not: A deep dive through gRPC, Kubernetes, and AWS networking](https://swe.quest/articles/it-s-always-dns-except-when-it-s-not-a-deep-dive-through-grpc-kubernetes-and-44627d906e7c0646.md): Datadog Engineering · 2022-04-13 · Hard · 18 min read · Networking, Kubernetes, DNS, Linux, Incidents & postmortems
  Errors during rollouts of Datadog's metrics query service looked like DNS failures, but the root cause was VPC connection tracking saturation on AWS ENIs.
- [Thundering herd of circuit breakers](https://swe.quest/articles/thundering-herd-of-circuit-breakers-b2ab1d42eebffb68.md): Zalando Engineering · 2026-10-07 · Medium · 9 min read · Resilience, Incidents & postmortems, Observability, Kubernetes, Capacity planning
  A client's circuit breaker stayed open for hours because its half-open probes hit a service that the HPA had scaled down to three pods.
- [Postmortem: Delayed Start Compute Operations](https://swe.quest/articles/postmortem-delayed-start-compute-operations-703bb5a68f31485c.md): Neon · 2025-05-21 · Medium · 4 min read · Incidents & postmortems, Kubernetes, Networking, Cloud platforms, Scaling
  A query plan change overloaded Neon's control plane database in AWS us-east-1, which stopped it from suspending idle databases.
- [2023-03-08 incident: A deep dive into the platform-level recovery](https://swe.quest/articles/2023-03-08-incident-a-deep-dive-into-the-platform-level-recovery-ad2b07fa89f3cad4.md): Datadog Engineering · 2023-06-16 · Hard · 21 min read · Incidents & postmortems, Kubernetes, Cloud platforms, Capacity planning, Networking
  Recovering from Datadog's March 8, 2023 multi-region outage, triggered by a systemd-networkd patch on Ubuntu 22.04 that cut network connectivity for nodes running Cilium, required restoring Kubernetes clusters in a strict order: parent control planes, then child control planes hosted on parent nodes, then application nodes.
- [Improving DNS performance with NodeLocalDNS](https://swe.quest/articles/improving-dns-performance-with-nodelocaldns-01d6f54219a60f0f.md): Neon · 2025-12-01 · Medium · 6 min read · DNS, Kubernetes, Performance engineering, Caching, Networking
  Neon deployed node-local-dns as a DaemonSet across its EKS clusters running hundreds of thousands of ephemeral Postgres pods, moving the 95%+ cache-hit DNS traffic off the network and onto each node.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
