Scaling OpenTelemetry: Insights on eBPF Overhead in Kubernetes
In the world of Kubernetes, observability is key to maintaining performance and reliability. OpenTelemetry (OTel) serves as an observability platform that integrates with a central LGTM backend—Loki, Grafana, Tempo, and Mimir. However, as your application scales, the ability to gather and analyze telemetry data without introducing significant overhead becomes a challenge. This is where eBPF shines, allowing you to measure CPU overhead and instrument traffic seamlessly.
The mechanics of scaling OpenTelemetry involve deploying gateway Collectors that can scale from 3 to 20 replicas. Each Collector receives spans and generates metrics for spans and service graphs. A notable observation is that discrepancies can arise between API request rates, which necessitates a two-stage approach for the gateway. In Stage 1, Kubernetes metadata is added, and spans are routed to a headless Service. Stage 2 then builds the service graph and exports it to Tempo. Additionally, span metrics utilize a load-balancing exporter keyed by service and span name. eBPF plays a vital role in this setup by instrumenting the daemon's HTTP traffic, linking spans to callers' traces, and measuring CPU time per request.
In production, you need to be aware of the implications of these technologies. While OpenTelemetry provides a robust framework for observability, high-traffic core instances should remain uninstrumented due to the potential 25% CPU hit on their hot paths. This is a critical consideration when determining how to implement observability in your Kubernetes environment, as the trade-offs can significantly affect performance.
Key takeaways
- →Scale gateway Collectors from 3 to 20 replicas to manage spans effectively.
- →Use eBPF to instrument HTTP traffic without modifying the daemon, ensuring minimal overhead.
- →Monitor RED metrics to reflect all served traffic accurately, generated before sampling.
- →Implement a two-stage gateway approach to manage Kubernetes metadata and service graph exports.
- →Avoid instrumenting high-traffic core instances to prevent excessive CPU overhead.
Why it matters
Effective scaling of OpenTelemetry with eBPF can drastically improve your observability without compromising performance, which is crucial for maintaining high availability in production environments.
When NOT to use this
High-traffic core instances stay uninstrumented—a 25% hit is too much for their hot path. Consider this carefully when planning your observability strategy.
Want the complete reference?
Read official docsIndustry-standard certifications built by the people behind Linux and Kubernetes. Earn the CKA — the gold standard Kubernetes administrator cert. OpsCanary readers get 30% off year-round with code OPSCANARY3.
Get CKA certified →Is Your OpenTelemetry Pipeline a Performance Bottleneck?
If your OpenTelemetry pipeline is slowing down your applications, it's time to take a closer look. Instrumentation overhead can vary significantly based on your workload. Learn how to optimize your telemetry pipeline to prevent bottlenecks.
Adyen Joins CNCF: Elevating Open Source Financial Infrastructure with Kubernetes
Adyen's entry as a Platinum End User Member of CNCF marks a significant step for open source financial infrastructure. With over 100 Kubernetes clusters and tools like Cilium and Prometheus, they are set to influence the community profoundly.
Lessons from Sustainability Month: Insights for Kubernetes Engineers
Sustainability Month opened our eyes to the intersection of cloud-native technologies and environmental responsibility. We explored tools like OpenTelemetry for carbon observability and the CNCF's Kepler project. Discover how these initiatives can shape your Kubernetes practices.
Get the daily digest
One email. 5 articles. Every morning.
No spam. Unsubscribe anytime.