<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Karina Babcock</title>
    <description>The latest articles on Forem by Karina Babcock (@karinababcock).</description>
    <link>https://forem.com/karinababcock</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1405780%2Ffcceeb06-5f28-4fa9-b618-c8034fc57036.jpeg</url>
      <title>Forem: Karina Babcock</title>
      <link>https://forem.com/karinababcock</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/karinababcock"/>
    <language>en</language>
    <item>
      <title>When Everything Is Instrumented, and You Still Don't Know What's Broken</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Mon, 11 Aug 2025 15:28:18 +0000</pubDate>
      <link>https://forem.com/causely/when-everything-is-instrumented-and-you-still-dont-know-whats-broken-13j8</link>
      <guid>https://forem.com/causely/when-everything-is-instrumented-and-you-still-dont-know-whats-broken-13j8</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;Why microservices need causal reasoning, not just observability&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;You did the right things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your microservices are fully instrumented.&lt;/li&gt;
&lt;li&gt;You’ve got distributed tracing and a modern observability stack.&lt;/li&gt;
&lt;li&gt;You even built custom dashboards.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But during a major production incident, it still took hours to figure out what was wrong.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;

&lt;p&gt;In our recent webinar, &lt;em&gt;'Rethinking Reliability for Distributed Systems,'&lt;/em&gt; Causely co-founder &lt;a href="https://www.linkedin.com/in/endresara" rel="noopener noreferrer"&gt;Endre Sara&lt;/a&gt; shared a story we hear far too often: a large-scale customer, running mature microservices in Kubernetes with full observability coverage, still struggles to understand what’s broken during a high-stakes business event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why microservices break differently
&lt;/h2&gt;

&lt;p&gt;Distributed systems aren't just complex, they're dynamic. Services spin up and down. Async data flows hide causal relationships. Teams own different pieces. Dashboards fill up with symptoms, not answers.&lt;/p&gt;

&lt;p&gt;That's what happened to a large enterprise team Endre worked with. They had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mature Kubernetes operations&lt;/li&gt;
&lt;li&gt;Kafka for async comms&lt;/li&gt;
&lt;li&gt;Comprehensive tracing + telemetry&lt;/li&gt;
&lt;li&gt;A seasoned SRE team
And still, they couldn't find the root cause of a high-stakes incident.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem wasn't a lack of data. It was a lack of &lt;a href="https://www.causely.ai/blog/causal-reasoning-the-missing-piece-to-service-reliability?ref=dev.to"&gt;causal reasoning&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch the recording: Rethinking Reliability for Distributed Systems
&lt;/h2&gt;

&lt;p&gt;In this session, Endre walks through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why microservices environments &lt;a href="https://www.causely.ai/blog/be-smarter-about-observability-data?ref=dev.to"&gt;overwhelm traditional observability&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;How causal reasoning changes incident response&lt;/li&gt;
&lt;li&gt;What teams can do to move from firefighting to foresight
Whether you’re drowning in alerts or struggling to explain why something broke, this talk offers a clear new perspective and a path forward.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/iuroPvbvDk8"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>reliability</category>
      <category>observability</category>
      <category>microservices</category>
      <category>rca</category>
    </item>
    <item>
      <title>Launching our new integration with OpenTelemetry</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Wed, 05 Mar 2025 16:07:13 +0000</pubDate>
      <link>https://forem.com/causely/launching-our-new-integration-with-opentelemetry-5hi8</link>
      <guid>https://forem.com/causely/launching-our-new-integration-with-opentelemetry-5hi8</guid>
      <description>&lt;h2&gt;
  
  
  Bridging the gap between observability data and actionable insight
&lt;/h2&gt;

&lt;p&gt;Observability has become a cornerstone of application reliability and performance. As systems grow more complex—spanning microservices, third-party APIs, and asynchronous messaging patterns—the ability to monitor and debug these systems is both a necessity and a challenge. &lt;/p&gt;

&lt;p&gt;OpenTelemetry (OTEL) has emerged as a powerful, open source framework that standardizes the collection of telemetry data across distributed systems. It promises unprecedented visibility into logs, metrics, and traces, empowering engineers to identify issues and optimize performance across multiple languages, technologies and cloud environments. &lt;/p&gt;

&lt;p&gt;But with great visibility comes a hidden cost. While OTEL democratizes observability, it also exacerbates the “big data problem” of modern DevOps. &lt;/p&gt;

&lt;p&gt;This is where Causely comes in—today, &lt;a href="https://www.causely.ai/blog/causely-launches-new-integration-with-opentelemetry-cutting-through-the-observability-noise-and-pinpointing-what-matters?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=otel_integration"&gt;we announced a new integration with OTEL&lt;/a&gt; that bridges the gap between OTEL's data deluge and actionable insights. In this post, we’ll explore the strengths and limitations of OpenTelemetry, the challenges it introduces, and how Causely transforms raw telemetry into precise, cost-effective analytics. &lt;/p&gt;

&lt;h2&gt;
  
  
  The OpenTelemetry opportunity
&lt;/h2&gt;

&lt;p&gt;Microservices are a tangled web of interdependencies that communicate over REST or gRPC. Asynchronous systems like Kafka shuttle messages between loosely coupled services. Infrastructure dynamically scales resources to meet demand. Observability has become the glue that holds these systems together, enabling engineers to monitor performance, troubleshoot issues, and ensure reliability. &lt;/p&gt;

&lt;p&gt;At the heart of the observability revolution is OpenTelemetry (OTEL), an open-source standard that unifies the instrumentation and collection of telemetry data across logs, metrics, and traces. Its modular architecture, community-driven development, and broad compatibility with existing observability tools have made OTEL the de facto choice for modern DevOps teams. &lt;/p&gt;

&lt;h3&gt;
  
  
  What does OpenTelemetry do?
&lt;/h3&gt;

&lt;p&gt;OpenTelemetry provides APIs, SDKs, and tools to capture three primary types of telemetry data: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logs: Detailed, timestamped records of system events (e.g., errors, warnings, and custom events). &lt;/li&gt;
&lt;li&gt;Metrics: Quantitative measurements of system health and performance (e.g., CPU usage, request latency, error rates). &lt;/li&gt;
&lt;li&gt;Traces: End-to-end views of requests flowing through distributed systems, mapping dependencies and execution paths.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With OTEL, engineers can instrument their code to emit these telemetry signals, use an OpenTelemetry Collector to aggregate and process the data, and export it to observability backends like Prometheus, Tempo, or Elasticsearch. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why OpenTelemetry is a game-changer
&lt;/h3&gt;

&lt;p&gt;OpenTelemetry addresses a critical pain point in observability: fragmentation. Historically, different tools and platforms required unique instrumentation libraries, making it difficult to standardize observability across an organization. OTEL simplifies this by providing: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vendor-Agnostic Instrumentation: A single API to instrument applications regardless of the backend. &lt;/li&gt;
&lt;li&gt;Centralized Data Collection: The OpenTelemetry Collector serves as a pluggable data pipeline, consolidating telemetry from various sources. &lt;/li&gt;
&lt;li&gt;Interoperability: Native support for popular backends like Prometheus, Tempo, and other vendors, allowing teams to integrate OTEL into their existing observability stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Technical example: Debugging latency issues
&lt;/h3&gt;

&lt;p&gt;Consider a microservices-based e-commerce application experiencing high latency during checkout. With OTEL traces, you can get a lot of information about the performance of this service but it is hard to find out what is responsible for the latency. For example: &lt;a href="https://github.com/esara/robot-shop/blob/instrumentation/dispatch/main.go#L172" rel="noopener noreferrer"&gt;https://github.com/esara/robot-shop/blob/instrumentation/dispatch/main.go#L172&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
func processOrder(headers map[string]interface{}, order []byte) { 
    start := time.Now() 
    log.Printf("processing order %s\n", order) 
    tracer := otel.Tracer("dispatch") 

    // headers is map[string]interface{} 
    // carrier is map[string]string 
    carrier := make(propagation.MapCarrier) 
    // convert by copying k, v 
    for k, v := range headers { 
       carrier[k] = v.(string) 
    } 

    ctx := otel.GetTextMapPropagator().Extract(context.Background(), carrier) 

    opts := []oteltrace.SpanStartOption{ 
       oteltrace.WithSpanKind(oteltrace.SpanKindConsumer), 
    } 
    ctx, span := tracer.Start(ctx, "processOrder", opts...) 
    defer span.End() 

    span.SetAttributes( 
       semconv.MessagingOperationReceive, 
       semconv.MessagingDestinationName("orders"), 
       semconv.MessagingRabbitmqDestinationRoutingKey("orders"), 
       semconv.MessagingSystem("rabbitmq"), 
       semconv.NetAppProtocolName("AMQP"), 
    ) 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By exporting these traces to a backend like Tempo, engineers can visualize the request flow and identify bottlenecks, such as consuming messages from RabbitMQ in the dispatch service and inserting an order in a MongoDB database.  &lt;/p&gt;

&lt;h2&gt;
  
  
  The Big Data problem of observability
&lt;/h2&gt;

&lt;p&gt;OpenTelemetry’s ability to capture detailed telemetry data is a double-edged sword. While it empowers engineers with unprecedented visibility into their systems, it also introduces challenges that can hinder the very goals observability aims to achieve. The sheer volume of data collected—logs, metrics, and traces from thousands of microservices—can overwhelm infrastructure, slow down workflows, inflate costs, and most importantly drown engineers with data. This “big data problem” of observability is a natural consequence of OpenTelemetry’s strengths but must be addressed to make the most of its potential. &lt;/p&gt;

&lt;h3&gt;
  
  
  OpenTelemetry collects a lot of data
&lt;/h3&gt;

&lt;p&gt;At its core, OpenTelemetry is designed to be exhaustive. This design ensures engineers can instrument their systems to capture every possible detail. For example: &lt;/p&gt;

&lt;p&gt;A high-traffic e-commerce site might generate logs for every HTTP request, metrics for CPU and memory usage, and traces for each request spanning multiple services. &lt;/p&gt;

&lt;p&gt;OpenTelemetry auto instrumentation libraries are an easy way to instrument HTTP, GRPC, messaging, database and caching libraries in all languages, but they generate metrics and traces for every call between every microservice, managed service, database and third-party API. &lt;/p&gt;

&lt;p&gt;Consider a production environment running thousands of microservices, each processing hundreds of requests per second. Using OpenTelemetry: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logs: A single request might generate dozens of log entries, resulting in millions of logs per minute. &lt;/li&gt;
&lt;li&gt;Metrics: Resource utilization metrics are emitted periodically, adding continuous streams of quantitative data. &lt;/li&gt;
&lt;li&gt;Traces: Distributed traces can contain hundreds of spans, each adding its own metadata. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While this level of detail is invaluable for debugging and optimization, it quickly scales beyond what many teams are prepared to manage. The amount of data makes it difficult to troubleshoot problems, manage escalations, be proactive about deploying new code, and plan for future investments. &lt;/p&gt;

&lt;h3&gt;
  
  
  The cost of data
&lt;/h3&gt;

&lt;p&gt;The problem with this massive volume of telemetry data isn’t just about storage; it’s also about processing and time-to-insight. Let’s break it down: &lt;/p&gt;

&lt;p&gt;Networking Costs: Transmitting telemetry data from distributed systems, microservices, or edge devices to central storage or processing locations incurs significant bandwidth usage. This can result in substantial networking costs, especially for real-time telemetry pipelines or when dealing with geographically dispersed infrastructure. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storage Costs: Logs, metrics, and traces consume vast amounts of storage, often requiring specialized solutions like Elasticsearch, Amazon S3, or Prometheus’s TSDB. These systems must scale horizontally, adding significant operational overhead. &lt;/li&gt;
&lt;li&gt;Compute Costs: Telemetry data needs to be parsed, indexed, queried, and analyzed. Complex queries, such as joining multiple traces to identify bottlenecks, can place a heavy burden on compute resources. &lt;/li&gt;
&lt;li&gt;Time Costs: During a high-severity incident, every second counts. Pinpointing the root cause is like looking for a needle in a haystack. With OpenTelemetry, the haystack is much bigger, making the task harder and longer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Time-to-insight delays
&lt;/h3&gt;

&lt;p&gt;Imagine a scenario where an outage occurs in a distributed system. An engineer might start by querying logs for errors, then switch to metrics to identify anomalies, and finally inspect traces to pinpoint the failing service. Each query takes time, and engineers often waste effort chasing irrelevant leads. This delay increases Mean Time to Detect (MTTD) and Mean Time to Resolve (MTTR), directly impacting uptime and user satisfaction. &lt;/p&gt;

&lt;h3&gt;
  
  
  Noise vs. signal
&lt;/h3&gt;

&lt;p&gt;Another challenge is separating the signal (useful insights) from the noise (redundant or irrelevant data). With OTEL: &lt;/p&gt;

&lt;p&gt;Logs can be overly verbose, capturing routine events that clutter debugging efforts. &lt;/p&gt;

&lt;p&gt;Metrics might lack the context needed to tie resource anomalies back to specific root causes. &lt;/p&gt;

&lt;p&gt;Traces can become overwhelming in high-traffic systems, with thousands of spans providing more detail than is actionable. &lt;/p&gt;

&lt;p&gt;While OTEL excels at capturing data, it doesn’t inherently prioritize it. This creates a bottleneck for engineers who need actionable insights quickly. &lt;/p&gt;

&lt;h2&gt;
  
  
  The need for top-down analytics
&lt;/h2&gt;

&lt;p&gt;Along with the benefits of modern observability tooling come challenges that need to be addressed. OpenTelemetry (OTEL) may unify telemetry data collection, but its bottom-up approach leaves teams drowning in redundant metrics, irrelevant logs, and sprawling traces. Without a clear purpose, teams end up collecting everything “just in case,” overwhelming engineers with noise and diluting the actionable insights needed to keep systems running. &lt;/p&gt;

&lt;p&gt;A top-down approach to observability flips the script. Instead of starting with what data is available, it begins with defining the goals: root cause analysis, SLO compliance, or performance optimization. By focusing on purpose, teams can build the analytics required to achieve those goals and then collect only the data necessary to power those insights.  &lt;/p&gt;

&lt;p&gt;For example: &lt;/p&gt;

&lt;p&gt;If the goal is root cause analysis, focus on traces that map dependencies across microservices, rather than capturing every granular log. &lt;br&gt;
If the goal is performance optimization, prioritize metrics that highlight latency bottlenecks over exhaustive resource utilization data. &lt;br&gt;
This shift reduces noise, minimizes data storage and processing costs, and accelerates time-to-insight. &lt;/p&gt;

&lt;h3&gt;
  
  
  The cost of ignoring purpose
&lt;/h3&gt;

&lt;p&gt;The current approach to observability is plagued by fragmentation. Point tools like APMs, native Kubernetes instrumentation, and cloud-specific monitors operate in silos, each with its own data model and semantics. This forces engineers to manually correlate information across dashboards, increasing time to resolution and undermining efficiency. Over time, the storage, compute, and human costs of managing fragmented data become unsustainable. &lt;/p&gt;

&lt;p&gt;Ask yourself: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How much of your telemetry data is redundant or irrelevant? &lt;br&gt;
Are your engineers spending more time troubleshooting tools than resolving incidents? &lt;br&gt;
Is your observability stack delivering insights or merely adding complexity? &lt;br&gt;
Without a unified purpose and targeted analytics, observability becomes another “big data problem,” and your total cost of ownership (TCO) spirals out of control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Causely can help
&lt;/h2&gt;

&lt;p&gt;Causely transforms OpenTelemetry’s raw telemetry data into actionable insights by applying a top-down, purpose-driven approach. Instead of drowning in logs, metrics, and traces, Causely’s platform leverages built-in causal models and advanced analytics to automatically pinpoint root causes, prioritize issues based on service impact, and predict potential failures before they occur. This turns observability from a reactive big data challenge into a system that continuously assure application reliability and performance. &lt;/p&gt;

&lt;h3&gt;
  
  
  How Causely brings focus
&lt;/h3&gt;

&lt;p&gt;Causely’s platform addresses these challenges head-on. Its causal reasoning starts with defining what matters: actionable insights to keep systems performing reliably and efficiently. Using built-in causal models and top-down analytics, Causely automatically pinpoints root causes and eliminates noise. By integrating with OTEL and other telemetry sources, Causely ensures that only the most critical data is collected, processed, and presented in real time. &lt;/p&gt;

&lt;p&gt;For example: &lt;/p&gt;

&lt;p&gt;In a microservices architecture, Causely maps dependencies and pinpoints the root cause of cascading failures, reducing MTTR. &lt;br&gt;
Similarly, with async messaging systems like Kafka, Causely pinpoints the bottlenecks that cause the consumer lag or delivery failures with actionable context, ensuring faster resolution. &lt;br&gt;
In cases where a third-party software is a root cause of issues, Causely pinpoints the root cause   by analyzing services impact. &lt;br&gt;
This approach not only reduces the TCO of observability but also ensures teams can focus on delivering value rather than managing data. &lt;/p&gt;

&lt;h3&gt;
  
  
  How Causely works with OpenTelemetry
&lt;/h3&gt;

&lt;p&gt;Causely Reasoning Platform is a model-driven, purpose-built Agentic AI system delivering multiple AI workers built on a common data model.   &lt;/p&gt;

&lt;p&gt;Causely integrates seamlessly with OpenTelemetry, using its telemetry streams as input while applying context and intelligence to deliver precise, actionable outputs. Here’s how Causely solves common observability challenges: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated topology discovery: Causely automatically builds a dependency map of your entire environment, identifying how applications, services, and infrastructure components interact. OpenTelemetry’s traces provide raw data, but Causely’s topology discovery transforms it into a visual graph that highlights critical paths and dependencies.
&lt;/li&gt;
&lt;li&gt;Root cause analysis in real time: Using causal models, Causely automatically maps all potential root causes to the observable symptoms they may cause. Causely uses this mapping in real time to automatically pinpoint the root causes based on the observed symptoms, prioritizing those that directly impact SLOs. For instance, when  request latency spikes  are  detected across multiple services, Causely pinpoints whether the spikes stem from a database query (and which database), a messaging queue (and which queue), or an external API (and which one), reducing MTTD and MTTR. &lt;/li&gt;
&lt;li&gt;Proactive prevention: Beyond solving problems, Causely helps prevent them. Its analytics can simulate “what-if” scenarios to predict the impact of configuration changes, workload spikes, or infrastructure upgrades. For example, Causely can warn you if scaling down a Kubernetes node pool might lead to resource contention under expected load.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example 1: Causely, OTEL, and microservices
&lt;/h3&gt;

&lt;p&gt;In a distributed e-commerce platform, a checkout service experiences intermittent failures. OpenTelemetry traces capture the flow of requests, but the data alone doesn’t explain the root cause. Causely’s causal models analyze the traces and identify that a dependent payment service is timing out due to a slow database query. This insight allows the team to address the issue without wasting time on manual debugging. &lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: Causely, OTEL, and third-party software
&lt;/h3&gt;

&lt;p&gt;A team - using a third-party CRM API - notices degraded response times during peak hours. OpenTelemetry provides metrics showing increased latency, but engineers are left guessing whether the issue lies with their application or the external service. Causely reasons about the API latency and third-party requests and identifies that the CRM is rate-limiting requests, prompting the team to implement retry logic. &lt;/p&gt;

&lt;h3&gt;
  
  
  Example 3: Causely, OTEL, and async messaging with Kafka
&lt;/h3&gt;

&lt;p&gt;A Kafka-based event pipeline shows sporadic delays in message processing. While OpenTelemetry traces highlight lagging consumers, it doesn’t explain why. Causely, reasoning about the behavior of the consumer microservices, identifies the root cause in the application’s mutex locking which is causing the slow consumption. The engineering team can focus on improving the locking of the data structure without the messaging infrastructure team having to scale up resources and waste time debugging Kafka. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reducing the big data burden
&lt;/h3&gt;

&lt;p&gt;Causely’s approach minimizes the data burden by focusing on relevance. Unlike traditional observability stacks that collect and store massive volumes of telemetry data, Causely processes raw metrics and traces locally, pushing only relevant context (e.g., topology and symptoms) to its backend analytics. This reduces storage and compute costs while ensuring engineers get the insights, they need, without delay. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Transforming observability with Causely
&lt;/h2&gt;

&lt;p&gt;OpenTelemetry has redefined observability by standardizing how telemetry data is collected and processed, but its bottom-up approach leaves teams overwhelmed by the sheer volume of logs, metrics, and traces. Observability shouldn’t be about how much data you collect—it’s about how much insight you can gain to keep your systems running efficiently. Without clear prioritization and contextual insights, the observability stack can quickly become a costly burden—both in terms of infrastructure and engineering time. &lt;/p&gt;

&lt;p&gt;Causely integrates seamlessly with OpenTelemetry and helps bring order to the chaos, empowering teams to make smarter, faster decisions that directly impact reliability and user experience. Causely uses causal models, automated topology discovery and real-time analytics to pinpoint root causes, prevent incidents, and optimize performance. This reduces noise, eliminates unnecessary data collection, and allows teams to focus on delivering reliable systems rather than managing observability overhead. &lt;/p&gt;

&lt;p&gt;Ready to move beyond data overload and transform your observability strategy? &lt;a href="https://www.causely.ai/try?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=otel_integration"&gt;Book a demo&lt;/a&gt; or &lt;a href="https://auth.causely.app/oauth/account/sign-up" rel="noopener noreferrer"&gt;start your free trial&lt;/a&gt; to see how Causely can help you take control of your telemetry data and build more reliable cloud-native applications. &lt;/p&gt;

</description>
      <category>observability</category>
      <category>opentelemetry</category>
      <category>devops</category>
    </item>
    <item>
      <title>In 2025, I resolve to be proactive about reliability</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Tue, 21 Jan 2025 20:07:35 +0000</pubDate>
      <link>https://forem.com/causely/in-2025-i-resolve-to-be-proactive-about-reliability-5eka</link>
      <guid>https://forem.com/causely/in-2025-i-resolve-to-be-proactive-about-reliability-5eka</guid>
      <description>&lt;h2&gt;
  
  
  What developers can do in 2025 to be proactive and prevent incidents before they happen, without sacrificing development time
&lt;/h2&gt;

&lt;p&gt;Making changes to production environments is one of the riskiest parts of managing complex systems. Even a small, seemingly harmless tweak—a configuration update, a database schema adjustment, or a scaling decision—can have unintended consequences. These changes ripple across interconnected services, and without the right tools, it’s nearly impossible to predict their impact. &lt;/p&gt;

&lt;p&gt;Business needs speed and agility in introducing new capabilities and features but without scarifying reliability, performance and predictability. Hence, engineers need to know how a new feature, or even a minor change, will affect performance, reliability, and SLO compliance before it goes live. But existing observability tools lack the required capabilities to provide useful insights that enable engineers to safely deploy new features. The result? Reduced productivity, slowdown in feature development, and reactive firefighting when changes go wrong -- all leading to downtime, stress, and diminished user trust. &lt;/p&gt;

&lt;p&gt;Recently, we worked with a customer who sought to shift their reactive posture to one that more aggressively seeks out problems before they happen.  With this customer, a bug within one of their microservices (the data producer) caused the producer to stop updating the Kafka topic with new events.  This created a backlog of events for all the consumers of this topic.  As a result, their customers were looking at stale data.  Problems like this lead to poor customer experience and revenue loss, so many customers need to adopt a preventative mode of operations.&lt;/p&gt;

&lt;p&gt;This post explores how this trend can be disrupted by providing the analytics and the reasoning capabilities to transform how changes are made, empowering teams to anticipate risks, validate decisions, and protect system stability—all before the first line of code is deployed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Being proactive is easier said than done
&lt;/h2&gt;

&lt;p&gt;Change management is a process designed to ensure changes are effective, resolve existing issues, and maintain system stability without introducing new problems. At its core, this process requires a deep understanding of both the system’s dependencies and its state before and after a change.  &lt;/p&gt;

&lt;p&gt;Production changes are risky because engineers typically lack sufficient visibility into how changes will impact the behavior of entire systems. What seems like an innocuous change to an environment file or an API endpoint could have far-reaching ramifications that aren’t always obvious to the developer. &lt;/p&gt;

&lt;p&gt;While observability tools have come a long way in helping teams monitor systems, they lack the analytics required to understand, analyze, and predict the reliability and performance behavior of cloud-native systems. As a result, engineers are left to “deploy and hope for the best” ... and get a 3AM call when things didn’t work as expected. And, while we live in a veritable renaissance of developer tooling, most of these tools focus on developer productivity, not developer understanding, of whole systems and the consequences of changes made to one component or service. &lt;/p&gt;

&lt;h3&gt;
  
  
  It’s hard to predict the impact of code changes
&lt;/h3&gt;

&lt;p&gt;When planning a change, the priority besides adding new functionality is to confirm whether it addresses the specific service degradations or issues it was designed to resolve. Equally important is ensuring that the change does not introduce new regressions or service degradations. &lt;/p&gt;

&lt;p&gt;Achieving these goals requires a comprehensive understanding of the system’s architecture, particularly the north-south (layering) dependencies and the east-west (service-to-service) interactions. Beyond mapping the topology, it is crucial to understand the data flow within the system—how data is processed, transmitted, and consumed—because these flows often reveal hidden interdependencies and potential impact areas.  &lt;/p&gt;

&lt;p&gt;Even minor configuration changes can create cascading failures in distributed systems. For instance, adjusting the scaling parameters of an application might inadvertently overload a backend database, causing performance degradation across services. Engineers often rely on experience, intuition, or manual testing, but these methods can’t account for the full complexity of modern environments. &lt;/p&gt;

&lt;h3&gt;
  
  
  Unpredictable performance behavior of microservices
&lt;/h3&gt;

&lt;p&gt;As we discussed in our &lt;a href="https://www.causely.ai/blog/eliminate-escalations-and-finger-pointing?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_proactive_reliability"&gt;previous post&lt;/a&gt;, loosely coupled microservices communicate with each other and share resources. But which services depend on which? And what resources are shared by which services? These dependencies are continuously changing and, in many cases, unpredictable.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhpl4pqc2h2ts2c3ggef2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhpl4pqc2h2ts2c3ggef2.png" alt="Microservices architectures are complex. Source: https://www.slideshare.net/slideshow/microservices-the-right-way/51115560#12" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A congested database may cause performance degradations of some services that are accessing the database. But which one will be degraded? Hard to know. Depends. Which services are accessing which tables through what APIs? Are all tables or APIs impacted by the bottleneck? Which other services depend on the services that are degraded? Are all of them going to be degraded?  &lt;/p&gt;

&lt;p&gt;These are very difficult questions to answer. As a result, analyzing, predicting, and even just understanding the performance behavior of each service is very difficult. Furthermore, using existing brittle observability tools to diagnose how a bottleneck cascades across services is practically impossible.  &lt;/p&gt;

&lt;h3&gt;
  
  
  There’s a lack of “what-if” analysis tools for testing resilience
&lt;/h3&gt;

&lt;p&gt;Even though it’s important to simulate and test the impact of changes before deployment, the tools currently available are sorely lacking. Chaos engineering tools like Gremlin and Chaos Monkey simulate failures, but don’t evaluate the impact of configuration changes. Tools like Honeycomb provide event-driven observability, but don’t help much with simulating what will happen with new builds. Inherently, if the tools can’t analyze the performance behavior of the services, they can’t support any “what-if” analysis. &lt;/p&gt;

&lt;p&gt;Developer tools are inherently focused on the “build and deploy” phases of the software lifecycle, meaning they prioritize pre-deployment validation over predictive insights. They don’t provide answers to critical questions like: “How will this change impact my service’s reliability or my system’s SLOs?” or “Will this deployment create new bottlenecks?” &lt;/p&gt;

&lt;p&gt;Predictive insights require correlating historical data, real-time metrics, dependency graphs, and most importantly deep understanding of the microservices performance behaviors. Developer tools simply aren’t built to ingest or analyze this kind of data at the system level. &lt;/p&gt;

&lt;h3&gt;
  
  
  Developer and operations tools today are both insufficient
&lt;/h3&gt;

&lt;p&gt;Developer tools are essential for building functional, secure, and deployable code, but they are fundamentally designed for a different domain than observability. Developer tools focus on ensuring “what” is built and deployed correctly, while observability tools aim to identify “when” something is happening in production. The two domains overlap but rarely address the full picture. &lt;/p&gt;

&lt;p&gt;Bridging this gap often involves integrating developer workflows—such as CI/CD pipelines—with observability systems. While this integration can surface useful metrics and automate parts of the release process, it still leaves a critical blind spot: understanding “why” something is happening. Neither traditional developer tools nor current observability platforms are designed to address the complexity of dynamic, real-world systems. &lt;/p&gt;

&lt;p&gt;To answer the “why,” you need a purpose-built system to unravel the interactions, dependencies, and behaviors that drive modern production environments. &lt;/p&gt;

&lt;h2&gt;
  
  
  Building for reliability
&lt;/h2&gt;

&lt;p&gt;Building reliable performing applications was never easy, but it has become much harder. As David Shergilashvili correctly states in his recent post &lt;a href="https://www.linkedin.com/pulse/microservices-bottlenecks-david-shergilashvili-zsujf?utm_source=share&amp;amp;utm_medium=member_ios&amp;amp;utm_campaign=share_via" rel="noopener noreferrer"&gt;Microservices Bottlenecks&lt;/a&gt;, “In modern distributed systems, microservices architecture introduces complex performance dynamics that require deep understanding. Due to their distributed nature, service independence, and complex interaction patterns, microservices systems' performance characteristics differ fundamentally from monolithic applications.” &lt;/p&gt;

&lt;p&gt;Continuing to collect data and presenting it to developers in pretty dashboards with very little or no built-in analytics to provide meaningful insights won’t get us to build reliable distributed microservices applications. &lt;/p&gt;

&lt;p&gt;To accurately assess the impact of a change, the state of the system must be assessed both before and after the change is implemented. This involves monitoring key indicators such as system health, performance trends, anomaly patterns, threshold violations, and service-level degradations. These metrics provide a baseline for evaluating whether the change resolves known issues and whether it introduces new ones. However, the ultimate goal goes beyond metrics; it is to confirm that the known root causes of issues are addressed and that no new root causes emerge post-change.  &lt;/p&gt;

&lt;p&gt;We need to build systems that enable engineers to introduce new features quickly, efficiently, and most importantly safely, i.e., without risking the reliability and performance of their applications. Reasoning platforms with built-in analytics need to provide actionable insights that anticipate implications and prevent issues. &lt;/p&gt;

&lt;p&gt;To learn about the required capabilities of these systems, read the rest of the article on &lt;a href="https://www.causely.ai/blog/be-proactive-about-reliability?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_proactive_reliability"&gt;causely.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>sre</category>
      <category>cloudnative</category>
      <category>microservices</category>
      <category>devops</category>
    </item>
    <item>
      <title>In 2025, I resolve to eliminate escalations and finger pointing</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Thu, 16 Jan 2025 21:47:43 +0000</pubDate>
      <link>https://forem.com/causely/in-2025-i-resolve-to-eliminate-escalations-and-finger-pointing-j2g</link>
      <guid>https://forem.com/causely/in-2025-i-resolve-to-eliminate-escalations-and-finger-pointing-j2g</guid>
      <description>&lt;p&gt;Originally posted to &lt;a href="https://www.causely.ai/blog/eliminate-escalations-and-finger-pointing?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_escalations"&gt;causely.ai&lt;/a&gt; by &lt;a href="https://www.linkedin.com/in/steffengeissinger/" rel="noopener noreferrer"&gt;Steffen Geissinger&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Make escalations less about blame and more about progress
&lt;/h2&gt;

&lt;p&gt;Microservices architectures introduce complex, dynamic dependencies between loosely coupled components. In turn, these dependencies lead to complex, hard to predict interactions. In these environments, any resource bottleneck, or any service bottleneck or malfunction, will cascade and affect multiple services, crossing team boundaries. As a result, the response often spirals into a chaotic mix of war rooms, heated Slack threads, and finger-pointing. The problem isn’t just technical—it’s structural. Without a clear understanding of dependencies and ownership, every team spends more time defending their work than solving the issue. It’s a waste of effort that undermines collaboration and prolongs downtime. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://causely.ai/blog/spend-less-time-troubleshooting?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_escalations"&gt;Yesterday, we resolved to spend less time troubleshooting in 2025.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Troubleshooting and escalation are closely intertwined. A single unresolved bottleneck can ripple outward, forcing multiple teams into reactive mode as they struggle to isolate the true root cause. This dynamic creates inefficiencies and delays, with teams often focusing on band-aiding symptoms instead of remediating and solving the root causes. To eliminate this friction, we need systems that do more than detect anomalies—they must provide a seamless view of dependencies, understand and analyze the performance behaviors of the microservices, assign ownership intelligently, and guide engineers toward resolution with precision and context. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwak4xkn508nau1bb9edh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwak4xkn508nau1bb9edh.jpg" alt="The complexity of escalations in SRE and DevOps orgs, according to ChatGPT" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take, for example, an application developer who notices high request duration for users who are trying to interact with their application. This application communicates with many different services, and it happens to run within a container environment on public cloud infrastructure.  There are more than 50 possible root causes that might be causing the high request duration issue.  That developer would need to investigate garbage collection issues, disk congestion, app-locking problems, and node congestion among many other potential root causes until accurately determining that a congested database is the source of their problem.  The only proper way to determine root cause is by considering all the cause-and-effect relationships between all the possible root causes and the symptoms they may cause. This process can often take hours or days before the correct root cause is pinpointed, resulting in a variety of &lt;a href="https://causely.ai/blog/fools-gold-or-future-fixer-can-ai-powered-causality-crack-the-rca-code-for-cloud-native-applications?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_escalations"&gt;business consequences&lt;/a&gt; (unhappy users, missed SLOs, SLA violations, etc.). &lt;/p&gt;

&lt;p&gt;In this post, we’ll explore the challenges of multi-team escalations, and the capabilities needed to address them. From automated dependency mapping to explainable triage workflows, we’ll show how observability can be transformed from chaos into clarity, making escalations less contentious and far more productive. &lt;/p&gt;

&lt;h2&gt;
  
  
  Escalations can cripple teams
&lt;/h2&gt;

&lt;p&gt;Escalations create inefficiencies that extend downtime, frustrate teams, and waste resources. These inefficiencies stem from a combination of structural and technical gaps in how dependencies are understood, root causes are isolated, and ownership is assigned. Here are some of the key challenges that make escalations so painful today: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is a lack of cross-team visibility into dependencies &lt;/li&gt;
&lt;li&gt;It can be hard to predict or analyze the performance behaviors of loosely coupled dependent microservices
&lt;/li&gt;
&lt;li&gt;It can be difficult to isolate the root cause among all affected services &lt;/li&gt;
&lt;li&gt;Legacy observability tools must be stitched together to provide even partial visibility into issues &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lack of cross-team visibility
&lt;/h3&gt;

&lt;p&gt;Microservices architectures are complex and full of deeply interconnected components. An issue in one can cascade into others. Without clear visibility into these dependencies, teams are left guessing which components are impacted and which team should take ownership. &lt;/p&gt;

&lt;p&gt;Your favorite observability tools help you visualize dependencies, but they lack real-time accuracy. These maps can quickly become outdated in environments with frequent changes. Some of them are great for aggregating logs, but don’t offer much insight into service relationships. Engineers are often left to piece together dependencies manually. &lt;/p&gt;

&lt;h3&gt;
  
  
  Unpredictable performance behavior of microservices
&lt;/h3&gt;

&lt;p&gt;Loosely coupled microservices communicate with each other and share resources. But which services depend on which? And what resources are shared by which services? These dependencies are continuously changing and, in many cases, unpredictable.  &lt;/p&gt;

&lt;p&gt;A congested database may cause performance degradations of some services that are accessing the database. But which one will be degraded? Hard to know. Depends. Which services are accessing which tables through what APIs? Are all tables or APIs impacted by the bottleneck? Which other services depend on the services that are degraded? Are all of them going to be degraded? These are very difficult questions to answer.  &lt;/p&gt;

&lt;p&gt;As a result, predicting, understanding and analyzing the performance behavior of each service is very difficult. Using existing brittle observability tools to diagnose how a bottleneck cascades across services is practically impossible.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Difficulty identifying root causes among all affected services
&lt;/h3&gt;

&lt;p&gt;Determining what’s a cause and what’s a symptom can be an incredibly time-consuming aspect of troubleshooting and escalations. Further, the person or team identifying a problem may well be looking at only their &lt;a href="https://www.cuemath.com/calculus/local-maximum-and-minimum" rel="noopener noreferrer"&gt;local maxima&lt;/a&gt;: the part of the system they work on or are directly affected by. They often don’t see the full picture of all intertwined systems. Identifying the root cause among all affected services can be inordinately difficult. &lt;/p&gt;

&lt;p&gt;Even if you have tools that are excellent for visualizing time-series data, you must still rely on engineers to manually correlate metrics. APM tools can help you examine application performance but require significant manual effort to link symptoms to underlying causes, especially in microservices-based, cloud-native applications. &lt;/p&gt;

&lt;h3&gt;
  
  
  Legacy observability tooling only gives you partial functionality
&lt;/h3&gt;

&lt;p&gt;While both established and up-and-coming tools offer valuable capabilities, they often address only one part of the problem, leaving critical gaps. Dependency visibility, performance analysis and root cause isolation need to be integrated seamlessly to reduce the chaos of escalations. Today’s tools, however, are fragmented, requiring engineers to bridge the gaps manually, costing valuable time and effort during incidents. Solving these problems demands a holistic approach that ties all these elements together in real time. &lt;/p&gt;

&lt;h2&gt;
  
  
  How escalations should be handled
&lt;/h2&gt;

&lt;p&gt;Escalations have negative consequences for organizations of all sizes. Let’s work together to build systems that render escalations less about blame and more about opportunities to foster trust and collaboration. &lt;/p&gt;

&lt;p&gt;These systems will require certain capabilities, which are explained further in the full article &lt;a href="https://www.causely.ai/blog/eliminate-escalations-and-finger-pointing?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_escalations"&gt;here&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>sre</category>
      <category>devops</category>
      <category>microservices</category>
    </item>
    <item>
      <title>In 2025, I resolve to spend less time troubleshooting</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Mon, 13 Jan 2025 16:31:37 +0000</pubDate>
      <link>https://forem.com/causely/in-2025-i-resolve-to-spend-less-time-troubleshooting-4ijl</link>
      <guid>https://forem.com/causely/in-2025-i-resolve-to-spend-less-time-troubleshooting-4ijl</guid>
      <description>&lt;h2&gt;
  
  
  What SREs and developers can do in 2025 to make troubleshooting more manageable
&lt;/h2&gt;

&lt;p&gt;Troubleshooting is an unavoidable part of life for SREs and developers alike, and it often feels like an endless grind. The moment a failure occurs, the clock starts ticking. If the failure impacts a mission critical application, every second counts. Outages can cost hours of wasted productivity, to say nothing of lost revenue and pricing concessions when you’ve violated an SLO. Pinpointing the root cause requires sifting through piles of logs, metrics that blur together, and false positives. Troubleshooting becomes a search for a needle in a haystack, and to make things even more complex, the needle may not even be in the haystack. Furthermore, when the failure originates in your scope of control, the pressure intensifies—you’re expected to resolve it quickly, minimize downtime, and restore service without disrupting the rest of your work. It’s a reactive process, and it’s draining.  &lt;/p&gt;

&lt;p&gt;But it doesn’t have to be this way. By adopting systems that solve the root cause analysis problem and automate troubleshooting, you can shift troubleshooting from a time-consuming, heavy-lifting chore to a streamlined task. Automated root cause analysis cuts through the noise and pinpoints the issue in no time.   &lt;/p&gt;

&lt;p&gt;With the right approach, troubleshooting becomes a quick, manageable part of your day, freeing you to focus on building systems that don’t just react better but fail less often. &lt;/p&gt;

&lt;h2&gt;
  
  
  What do we mean by troubleshooting?
&lt;/h2&gt;

&lt;p&gt;In a distributed microservices environment, troubleshooting often begins with an alert from the monitoring system or user feedback about degraded performance, such as increased latency or error rates. Typically, these issues are first observed in the service exposed to end users, such as an API gateway or frontend service. However, the root cause often lies deeper within the service architecture, making initial diagnosis challenging. The development team must begin by confirming the scope of the issue, correlating the alert with specific user-reported problems to identify whether it is isolated or systemic. &lt;/p&gt;

&lt;p&gt;The next step involves tracing the source of the alert within the service ecosystem. Using distributed tracing tools like OpenTelemetry, the team tracks requests as they propagate through various microservices, identifying where bottlenecks or failures occur. Concurrently, a service dependency map, often visualized through monitoring platforms, provides a bird’s-eye view of interactions between services, databases, caches, and other dependencies, helping to pinpoint potential hotspots in the architecture. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ui11n24sfs3la2vmfvx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ui11n24sfs3la2vmfvx.gif" alt="Example service dependency map. Source: Grafana" width="600" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the potential hotspots are identified, developers turn to metrics and logs for further insights. Resource utilization metrics, such as CPU, memory, and disk I/O, are analyzed to detect bottlenecks, while logs reveal specific errors or anomalies like timeouts or failed database queries. This analysis attempts to correlate symptoms with the timeline of the issue, offering clues to its origin. Often, the team experiments with quick fixes, such as scaling up CPU, memory, or storage for the affected services or infrastructure. While these adjustments might temporarily relieve symptoms, they rarely address the root cause and must be rolled back if ineffective.  &lt;/p&gt;

&lt;p&gt;When resource adjustments fail, a deeper dive into the affected components is necessary. Distributed traces provide detailed insights into slow transactions or failures, highlighting which services or calls are problematic. Developers then use continuous profiling tools to examine runtime data for each service, identifying resource-intensive methods, excessive memory allocations, or inefficient call paths. This granular analysis helps uncover inefficiencies or regressions in code performance. &lt;/p&gt;

&lt;p&gt;If the issue involves a database, further investigation focuses on query performance. Database profiling tools are used to analyze query execution times, frequency, and data volume. Developers assess whether queries are taking longer than usual, retrieving excessive data, or being executed too frequently. This step often reveals issues such as missing indexes, inefficient joins, or unoptimized queries, which could be contributing to overall service degradation. By iteratively analyzing and addressing these factors, the root cause of the problem is eventually resolved, restoring system stability and performance. &lt;/p&gt;

&lt;p&gt;Troubleshooting is reactive, time-consuming, and exhausting.  Developers should be focusing their time and energy (and their company’s investment) on innovation, yet troubleshooting forces them to turn their attention elsewhere. &lt;/p&gt;

&lt;p&gt;Troubleshooting doesn’t have to dominate your role; with the right systems, it can become efficient and manageable. &lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting is hard
&lt;/h2&gt;

&lt;p&gt;When trying to find the root cause of service or application outages or degradations, developers face numerous challenges: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s hard to pinpoint which service is the source of the degradations amid a flood of alerts &lt;/li&gt;
&lt;li&gt;It’s hard to diagnose and remediate the root cause &lt;/li&gt;
&lt;li&gt;It’s hard to see the forest from the trees &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  It’s hard to pinpoint which service is the source of the degradations amid a flood of alerts
&lt;/h3&gt;

&lt;p&gt;Failures propagate and amplify through the environment. A congested database or a congested resource will cause application starvation and service degradation that cascades throughout the system. Even if you deploy an observability tool to monitor the database or the resource, you may observe nothing on the database or the resource. And if you deploy an observability tool to monitor the applications and services, you will be flooded with alerts about application starvation and service degradations. Given the flood of alerts, pinpointing the bottleneck is very complex. As described above, it entails a time-consuming, heavy lifting, manual process under pressure.   &lt;/p&gt;

&lt;p&gt;The more observability tools you deploy, the more data you collect and the harder the problem gets. More alerts, more noise, more data you need to sift through. This is a journey to nowhere, a trajectory you want to reverse. &lt;/p&gt;

&lt;h3&gt;
  
  
  Diagnosing and remediating the root cause of a problem is hard
&lt;/h3&gt;

&lt;p&gt;Pinpointing the congested service, database or resource is hard and inefficient. Even if you know &lt;em&gt;where&lt;/em&gt; the root cause is, you may not know &lt;em&gt;what&lt;/em&gt; the root cause is. Without knowing what the root cause is, you can’t know what to remediate nor how to remediate.  &lt;/p&gt;

&lt;p&gt;Whether pinpointing &lt;em&gt;where&lt;/em&gt; the bottleneck is or pinpointing &lt;em&gt;what&lt;/em&gt; the root cause is, engineers rely on manual workflows to sift through logs, metrics, and traces. While new observability tools have emerged over the past decade focusing on cloud-native application infrastructure, and the traditional old guards have expanded their coverage to monitor the new technology landscape, &lt;a href="https://www.youtube.com/watch?v=rs-5SYlCj80" rel="noopener noreferrer"&gt;neither has solved the problem&lt;/a&gt;. Some may do a better job than others in correlating anomalies or slicing and dicing the information for you, but they leave it to you to diagnose and pinpoint the root cause, leaving the hardest part unsolved. Furthermore, most of them require time consuming setup and configuration, deep expertise to operate, and deep domain knowledge to realize their benefits. &lt;/p&gt;

&lt;p&gt;In practice, this means engineers are still performing most of the diagnostic work manually. The tools may be powerful, even elegant, but they don’t address the core challenge: &lt;a href="https://causely.ai/blog/the-rising-cost-of-digital-incidents-understanding-and-mitigating-outage-impact?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;diagnosing and remediating root causes remains a slow, resource-intensive process&lt;/a&gt;, particularly when time is of the essence during an incident. These gaps prolong resolution times, increase stress, and reduce time for proactive system improvements. &lt;/p&gt;

&lt;h3&gt;
  
  
  It’s hard to see the forest from the trees
&lt;/h3&gt;

&lt;p&gt;Once the engineers turn to dashboards to investigate further, they stare at dashboards created by bottom-up tools. These tools collect a lot of data (often at great cost) and present this data in their dashboards without regard to the purpose of the information and the problem that needs to be solved. Engineers sift through metrics, logs, and time-series data, trying to understand context, composition, and dependencies so they can manually piece together patterns and correlations. This is highly labor-intensive and drives the engineer to get lost in the weeds without understanding the big picture of how the business or the service is impacted.  Are service level objectives (SLOs) being violated? Are SLOs at risk? &lt;/p&gt;

&lt;p&gt;Take your favorite observability tool. It probably excels at visualizing time-series data. However, it requires engineers to manually connect trends across dashboards and services, which can be especially challenging in distributed systems. Similarly, application performance management (APM) tools provide rich metrics and infrastructure insights, but the sheer volume of data presented in their dashboards can overwhelm users, making it difficult to focus on the most relevant information.  &lt;/p&gt;

&lt;p&gt;These tools, while powerful, often fall short in helping engineers see the forest from the trees. Instead of guiding engineers toward the right priorities and actionable insights about the broader system or the root cause, or even better, automatically pinpointing the root cause and remediating, they frequently amplify the noise. Irrelevant data, ambiguous relationships, and false positives force engineers to wade through excessive details, wasting time and delaying resolution. The lack of a top-down perspective makes it harder to understand how symptoms connect to underlying problems, leaving engineers stuck in the weeds. &lt;/p&gt;

&lt;h2&gt;
  
  
  The negative consequences of troubleshooting today
&lt;/h2&gt;

&lt;p&gt;The way troubleshooting is done today has serious ramifications for organizations, teams, and individuals. It affects business outcomes and quality of life. &lt;/p&gt;

&lt;h3&gt;
  
  
  Failing to meet the SLAs
&lt;/h3&gt;

&lt;p&gt;Whether the goal is 5-nines, 4-nines, or even only 3-nines, if we continue to manually troubleshoot, we will never meet these SLAs. The table below illustrates how many minutes in a month the given SLA allows for downtime.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxgoiym4lg49pn9ufc5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxgoiym4lg49pn9ufc5g.png" alt="Source: https://en.wikipedia.org/wiki/High_availability#Percentage_calculation " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3-nines means 99.9% uptime—in other words, all services are performing reliably at least 99.9% of the time. So, if any of the services is degraded for more than 43.2 minutes in a month, the 3-nines SLA is not met. Because of the length of time manual troubleshooting entails, a single incident in the month will cause us to miss delivering on a 3-nines SLA. And 3-nines is not even so great! &lt;/p&gt;

&lt;h3&gt;
  
  
  High Mean Time to Detect and Resolve (MTTD/MTTR)
&lt;/h3&gt;

&lt;p&gt;The longer it takes to detect and resolve an issue, &lt;a href="https://causely.ai/blog/real-time-data-modern-uxs-the-power-and-the-peril-when-things-go-wrong?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;the greater the impact&lt;/a&gt; on customers and the business. Traditional troubleshooting workflows, which often rely on reactive and manual processes, are inherently slow. Engineers are forced to navigate through an overwhelming volume of alerts, sift through logs, and correlate metrics without clear guidance. This delay can lead to: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prolonged outages that damage user trust and satisfaction. &lt;/li&gt;
&lt;li&gt;Breaches of service level objectives (SLOs), which can result in financial penalties for organizations with stringent service level agreements (SLAs) &lt;/li&gt;
&lt;li&gt;Snowballing effects, where unresolved issues trigger secondary failures, compounding the problem and making resolution even more challenging. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Individual stress and burnout from constant reactive tasks
&lt;/h3&gt;

&lt;p&gt;The reactive nature of troubleshooting takes a significant toll on individual engineers. When every incident feels like a race against the clock, the pressure to resolve issues quickly can become overwhelming. Engineers often work under constant stress, juggling: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interruptions to their regular work, leading to disrupted schedules and decreased productivity. &lt;/li&gt;
&lt;li&gt;Escalations where they are expected to step in as subject matter experts, often during nights or weekends. &lt;/li&gt;
&lt;li&gt;Repeated exposure to alert noise, which can cause decision fatigue and desensitization to critical alerts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This relentless pace contributes to burnout. All it takes is a few hours of perusing the &lt;a href="https://www.reddit.com/r/sre/?ref=causely-blog.ghost.io" rel="noopener noreferrer"&gt;/r/sre subreddit&lt;/a&gt; to see that burnout is a very common issue among SREs and developers tasked with maintaining system reliability. Burnout not only affects individuals but also leads to higher attrition rates, disrupting team continuity and increasing hiring and training costs. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reduced time for proactive reliability engineering
&lt;/h3&gt;

&lt;p&gt;Troubleshooting dominates the time and energy of engineering teams, leaving little room for proactive reliability initiatives. As we will see later this week, proactive reliability engineering has extraordinary promise for the entire company: product/engineering, operations, business leaders. But instead of focusing on preventing incidents, engineers are stuck in a reactive loop. This trade-off results in: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delayed implementation of improvements that could enhance system stability and scalability. &lt;/li&gt;
&lt;li&gt;Accumulation of technical debt. &lt;/li&gt;
&lt;li&gt;A vicious cycle where the lack of proactive work increases the likelihood of future incidents, perpetuating the troubleshooting burden. 
By constantly reacting to problems rather than proactively addressing underlying issues, teams lose the ability to innovate and build resilient systems. This dynamic not only affects engineering morale but also has broader implications for an organization’s ability to compete and adapt in fast-paced markets. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How troubleshooting should look
&lt;/h2&gt;

&lt;p&gt;If we all recognize that the state of the art of troubleshooting is awful today, let’s work together to imagine a future where troubleshooting is routine and fast: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Systems automatically pinpoint root causes within your domain quickly and accurately.&lt;/strong&gt; Modern troubleshooting workflows must prioritize speed and precision. Systems should go beyond flagging symptoms and directly &lt;a href="https://causely.ai/blog/bridging-the-gap-between-observability-and-automation-with-causal-reasoning/?ref=causely-blog.ghost.io&amp;amp;utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;pinpoint the underlying cause&lt;/a&gt; within your domain. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actionable information provides necessary context upfront.&lt;/strong&gt; Systems need to focus on identifying the actions and ideally automating the automatable. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Troubleshooting workflows are streamlined.&lt;/strong&gt; Workflows should be intuitive and efficient, designed to minimize context switching and maximize focus with unified dashboards that integrate with your operational workflows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These systems must have certain capabilities to be effective: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Causality.&lt;/strong&gt; The ability to capture, represent, understand and analyze cause and effect relations. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning.&lt;/strong&gt; Generic analytics that can reason about causality and automatically pinpoint root causes based on observed symptoms. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automatic topology discovery.&lt;/strong&gt; The ability to automatically discover the environment, the entities and the relationships between them. &lt;br&gt;
With these systems, proper troubleshooting can drive positive business outcomes, such as: &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Delivering on SLOs and meeting SLAs.&lt;/strong&gt; Reduce the number of incidents. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Faster issue resolution, minimizing downtime.&lt;/strong&gt; Reduce mean time to detect (MTTD) and mean time to resolve or recover (&lt;a href="https://causely.ai/blog/mttr-meaning?ref=causely-blog.ghost.io&amp;amp;utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;MTTR&lt;/a&gt;), keeping systems operational and minimizing the impact on users. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved productivity by reducing time spent on reactive tasks.&lt;/strong&gt; Enable engineers to focus on high-value innovation. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Causely automates troubleshooting
&lt;/h2&gt;

&lt;p&gt;Our &lt;a href="https://causely.ai/product?ref=causely-blog.ghost.io&amp;amp;utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;Causal Reasoning Platform&lt;/a&gt; is a model-driven, purpose-built AI system delivering multiple analytics built on a common data model. It is designed to make troubleshooting much simpler and more effective by providing:  &lt;/p&gt;

&lt;h3&gt;
  
  
  Out-of-the-box Causal Models
&lt;/h3&gt;

&lt;p&gt;Causely is delivered with built-in causality knowledge capturing the common root causes that can occur in cloud-native environments. This causality knowledge enables Causely to automatically pinpoint root causes out-of-the-box as soon as it is deployed in an environment. There are at least a few important details to share about this causality knowledge:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It captures potential root causes in a broad range of entities including applications, databases, caches, messaging, load balancers, DNS compute, storage, and more. &lt;/li&gt;
&lt;li&gt;It describes how the root causes will propagate across the entire environment and what symptoms may be observed when each of the root causes occurs.
&lt;/li&gt;
&lt;li&gt;It is completely independent from any specific environment and is applicable to any cloud-native application environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Automatic topology discovery
&lt;/h3&gt;

&lt;p&gt;Cloud-native environments are a tangled web of applications and services layered over complex and dynamic infrastructure. Causely automatically discovers all the entities in the environment including the applications, services, databases, caches, messaging, load balancers, compute, storage, etc., as well as how they all relate to each other. For each discovered entity, Causely automatically discovers its:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connectivity&lt;/strong&gt; - the entities it is connected to and the entities it is communicating with horizontally
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layering&lt;/strong&gt; - the entities it is vertically layered over or underlying &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composition&lt;/strong&gt; - what the entity itself is composed of 
Causely automatically stitches all of these relationships together to generate a Topology Graph, which is a clear dependency map of the entire environment. This Topology Graph updates continuously in real time, accurately representing the current state of the environment at all times. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Root cause analysis
&lt;/h3&gt;

&lt;p&gt;Using the out-of-the-box Causal Models and the Topology Graph as described above, Causely automatically generates a causal mapping between all the possible root causes and the symptoms each of them may cause, along with the probability that each symptom would be observed when the root cause occurs. Causely uses this causal mapping to automatically pinpoint root causes based on observed symptoms in real time. No configuration is required for Causely to immediately pinpoint a broad set of root causes (100+), ranging from applications malfunctioning to services congestion to infrastructure bottlenecks.  &lt;/p&gt;

&lt;p&gt;In any given environment, there can be tens of thousands of different root causes that may cause hundreds of thousands of symptoms. Causely prevents SLO violations by detangling this mess, pinpointing the root cause that’s putting your SLOs at risk, and driving remediation actions before SLOs are violated. For example, Causely proactively pinpoints if a software update changes performance behaviors for dependent services before those services are impacted. &lt;/p&gt;

&lt;h3&gt;
  
  
  Service impact analysis
&lt;/h3&gt;

&lt;p&gt;Causely automatically analyzes the impact of the root causes on SLOs, prioritizing the root causes based on the violated SLOs and the ones that are at risk. Causely automatically defines standard SLOs (based on latency and error rate) and uses machine learning to improve its anomaly detection over time. However, environments that already have SLO definitions in another system can easily be incorporated in place of Causely’s default settings. &lt;/p&gt;

&lt;h3&gt;
  
  
  Contextual presentation
&lt;/h3&gt;

&lt;p&gt;The results are intuitively presented in the Causely UI, enabling users to see the root causes, related symptoms, the service impacts and initiate remedial actions. The results can also be sent to external systems to alert teams who are responsible for remediating root cause problems, to notify teams whose services are impacted, and to initiate incident response workflows. &lt;/p&gt;

&lt;h3&gt;
  
  
  Prevention analysis
&lt;/h3&gt;

&lt;p&gt;Teams can also ask "what if'' questions to understand the impact that potential problems might have if they were to occur to support the planning of service/architecture changes, maintenance activities and improving the resilience of services.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Postmortem analysis
&lt;/h3&gt;

&lt;p&gt;Teams can also review prior incidents and see clear explanations of why these occurred and what the effect was, simplifying the process of postmortems, enabling actions to be taken to avoid re-occurrences.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Troubleshooting doesn’t have to dominate a developer’s or SRE’s nightmare when the right systems are in place. Empower yourself with the only system that solves the root cause analysis problem to make troubleshooting a small, manageable part of your job. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.causely.ai/try?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=NYNY_troubleshooting"&gt;Book a meeting with the Causely team&lt;/a&gt; and let us show you how to stop troubleshooting and consistently meet your reliability expectations in cloud-native environments. &lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>microservices</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Tackling CPU Throttling in Kubernetes for Better Application Performance</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Mon, 02 Dec 2024 19:26:16 +0000</pubDate>
      <link>https://forem.com/causely/tackling-cpu-throttling-in-kubernetes-for-better-application-performance-1dko</link>
      <guid>https://forem.com/causely/tackling-cpu-throttling-in-kubernetes-for-better-application-performance-1dko</guid>
      <description>&lt;p&gt;CPU throttling is a frequent challenge in containerized environments, particularly for resource-intensive applications. It happens when a container surpasses its allocated CPU limits, prompting the scheduler to restrict CPU usage. While this mechanism ensures fair resource sharing, it can significantly impact performance if not properly managed. CPU throttling can be a major obstacle for applications like web APIs, video streaming platforms, and gaming servers. Addressing this issue involves two key steps: identifying throttling and implementing effective solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CPU Throttling?
&lt;/h2&gt;

&lt;p&gt;CPU throttling in containers occurs due to resource constraints set by control groups (cgroups). Kubernetes and other container orchestrators rely on cgroups to enforce resource limits. When a container attempts to use more CPU than its assigned quota, it gets throttled, delaying execution of tasks. (When containers have CPU limits defined, they will be converted to a cgroup CPU quota.)&lt;/p&gt;

&lt;p&gt;Working on the vendor side for over a decade, I have seen the impact CPU throttling can have on different services across many industries.  Here are three top-of-mind examples, both from my days at &lt;a href="https://www.ibm.com/products/turbonomic" rel="noopener noreferrer"&gt;Turbonomic&lt;/a&gt; and from recent conversations with customers at &lt;a href="https://causely.ai/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=cpu_throttling"&gt;Causely&lt;/a&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  Financial Systems
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Example: A stock trading platform uses containers to handle real-time market data feeds and execute trades. Throttling during peak trading hours delays data processing, potentially causing missed opportunities or incorrect order placements.&lt;/li&gt;
&lt;li&gt;Impact: Missed deadlines for transaction processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Gaming Servers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Example: Online multiplayer games hosted in containers experience throttling, leading to delayed responses (lag) during gameplay. Players may experience slow rendering of in-game actions or disconnections during high traffic.&lt;/li&gt;
&lt;li&gt;Impact: Latency and poor user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Video Streaming Platforms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Example: A video-on-demand service runs encoding jobs in containers to transcode videos. Throttling increases encoding times, leading to delayed content availability or poor streaming quality for users.&lt;/li&gt;
&lt;li&gt;Impact: Degraded video quality and buffering issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Identify CPU Throttling
&lt;/h2&gt;

&lt;p&gt;It’s often difficult to catch CPU throttling because it can happen even when the host CPU usage is low. It’s critical to have the right level of monitoring set up in order to see CPU throttling when it happens, or even better, before it becomes a problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitor Your cgroup Metrics
&lt;/h3&gt;

&lt;p&gt;Linux cgroups provide detailed metrics about CPU usage and throttling. Look for the &lt;code&gt;cpu.stat&lt;/code&gt; file within the container’s cgroup directory (usually under &lt;code&gt;/sys/fs/cgroup)&lt;/code&gt;:&lt;br&gt;
Within the &lt;code&gt;cpu.stat&lt;/code&gt; file there are three key metrics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nr_throttled&lt;/code&gt;: Number of times the container was throttled.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;throttled_time&lt;/code&gt;: Total time spent throttled – which I believe is in nanoseconds&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nr_periods&lt;/code&gt;: Total CPU allocation periods.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;code&gt;cat /sys/fs/cgroup/cpu/cpu.stat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nr_periods 12345
nr_throttled 543
throttled_time 987654321
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;nr_throttled&lt;/code&gt; or &lt;code&gt;throttled_time&lt;/code&gt; is high relative to &lt;code&gt;nr_periods&lt;/code&gt;, then you have CPU throttling on your container.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitor Container Orchestration Metrics
&lt;/h3&gt;

&lt;p&gt;If you’re running Kubernetes, you can use the &lt;a href="https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/kubectl_top_pod/" rel="noopener noreferrer"&gt;kubectl top pod&lt;/a&gt; command to get metric data on the highest utilized pods.  Try the command below to get metrics for a pod and all the associated containers:&lt;br&gt;
&lt;code&gt;kubectl top pod --containers&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is a very manual process, and you will need to compare the CPU usage against the defined limits in the pod’s resource config.  If you run a describe command on the pod it will show you this information.  This also means you will need to know which pod is having an issue on it.  Usually when issues arise on an application it’s going to take some time to drill down to a component that might be performing poorly.  You will need the Kubernetes metric server to be installed in order to run commands like kubectl top but being able to access metrics like &lt;code&gt;container_cpu_cfs_throttled_periods_total&lt;/code&gt; and &lt;code&gt;container_cpu_cfs_periods_total&lt;/code&gt; offer valuable insights into CPU usage and throttling.&lt;/p&gt;
&lt;h3&gt;
  
  
  Application Performance Metrics
&lt;/h3&gt;

&lt;p&gt;Although they can be expensive, &lt;a href="https://www.g2.com/categories/application-performance-monitoring-apm" rel="noopener noreferrer"&gt;application performance monitoring (APM) tools&lt;/a&gt; provide invaluable insights into CPU throttling, offering detailed visibility that can help uncover the issue. These tools can often track throttling over time, identify exactly when it first occurred, and, in some cases, even predict future throttling trends based on usage patterns. Many organizations use a combination of monitoring tools to get a comprehensive view of their systems. APM tools also highlight the symptoms of CPU throttling, which may manifest as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prolonged request durations, leading to slower application response times.&lt;/li&gt;
&lt;li&gt;Decreased throughput, resulting in fewer transactions or tasks processed within a given timeframe.&lt;/li&gt;
&lt;li&gt;Irregular CPU usage patterns, which can signal performance instability or inefficiencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining the capabilities of APM tools with metrics collected from Kubernetes, teams can proactively address CPU throttling and ensure optimal application performance.&lt;/p&gt;
&lt;h2&gt;
  
  
  Best Practices to Manage CPU Throttling in Kubernetes
&lt;/h2&gt;

&lt;p&gt;There are many ways to fix CPU throttling and even a few ways you can prevent it. Most root causes of CPU throttling are overcommitted nodes, or misconfigured CPU limits.  Below are some ways to fix CPU throttling when it occurs and some best practices to avoid it in the future.&lt;/p&gt;
&lt;h3&gt;
  
  
  Adjust CPU Limits
&lt;/h3&gt;

&lt;p&gt;Update resource limits in your container or pod configuration. Kubernetes resource specs can be updated like in the example below.  Usually what I see from the customers I have worked with is they will set the limit just above the peak usage in the last 30, 60, or even 90 days.  For non-critical workloads I have seen a few companies set this limit to 80% of max usage, and a few companies use more advanced techniques like calculating percentiles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources:
  requests:
    cpu: "500m"
  limits:
    cpu: "1000m"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Increase the &lt;code&gt;limits.cpu&lt;/code&gt; value to reduce throttling frequency.&lt;br&gt;
Set &lt;code&gt;requests.cpu&lt;/code&gt; to ensure better performance during contention.  Note that if you do not set the request, Kubernetes will automatically set the request to the limit.&lt;/p&gt;
&lt;h3&gt;
  
  
  Use Autoscaling like Horizontal Pod Autoscaler
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="noopener noreferrer"&gt;Horizontal Pod Autoscaler&lt;/a&gt; (HPA) in Kubernetes helps address CPU throttling by dynamically adjusting the number of pods in a deployment based on real-time resource usage.  Resources like CPU and memory are monitored, and when certain thresholds are met, HPA kicks in to provision more pods.  In more idle periods it will also scale down the number of pods to help you run more efficiently.  By distributing the workload across more pods, HPA reduces the CPU demands on individual pods, thereby mitigating CPU throttling.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
spec:
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: Resource
    resource:
      name: cpu
      targetAverageUtilization: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, if average CPU utilization across all pods exceeds 80% then it will add more pods as necessary within the bounds of 2-10 (Min and Max Replicas).&lt;/p&gt;

&lt;h3&gt;
  
  
  Analyze Node Resource Allocation
&lt;/h3&gt;

&lt;p&gt;Check overall CPU availability on nodes using a describe command:&lt;br&gt;
&lt;code&gt;kubectl describe node &amp;lt;node-name&amp;gt;&lt;/code&gt;&lt;br&gt;
Ensure nodes aren’t overcommitted. Use taints and tolerations to control scheduling and ensure high-priority workloads run on dedicated nodes.  Nodes that are overcommitted run the risk of not having available CPUs.  If containers’ requests are higher than the node CPU availability, you are going to run into scheduling problems.  Or if the limits are set too high relative to CPU availability on the node and the workload suddenly increases, then you are going to have contention.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tweak CPU CFS Settings
&lt;/h3&gt;

&lt;p&gt;Containers use the &lt;a href="https://docs.kernel.org/scheduler/sched-design-CFS.html" rel="noopener noreferrer"&gt;Completely Fair Scheduler&lt;/a&gt; (CFS) by default. The CFS in Kubernetes is a mechanism inherited from the Linux kernel that enforces CPU usage limits on containers. It works by using two key parameters from Linux cgroups: &lt;code&gt;cpu.cfs_quota_us&lt;/code&gt; and &lt;code&gt;cpu.cfs_period_us&lt;/code&gt;. These parameters allow Kubernetes to control the amount of CPU time a container can use over a specific period:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cpu.cfs_quota_us&lt;/code&gt;: Maximum microseconds of CPU time allowed per period.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cpu.cfs_period_us&lt;/code&gt;: Length of a scheduling period in microseconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To prevent CPU throttling: Increase &lt;code&gt;cpu.cfs_quota_us&lt;/code&gt; to provide more CPU time:&lt;br&gt;
&lt;code&gt;echo 200000 &amp;gt; /sys/fs/cgroup/cpu/cpu.cfs_quota_us&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I have seen this create issues before though so be careful with this adjustment as it can lead to overcommitment.  In other words, if too many tasks are scheduled and you increase the amount of time a container can use the CPU, then it will create delays and throttling.  Start by playing around with this in Dev or Test clusters before you make any changes to prod… duh. &lt;/p&gt;

&lt;h3&gt;
  
  
  Use CPU Pinning
&lt;/h3&gt;

&lt;p&gt;This is more of an edge case, but instead of using CPU shares and limits, pin containers to specific CPUs for predictable performance.  The Kubernetes CPU Manager controls how CPUs are allocated to containers.  The enable CPU pinning, the &lt;a href="https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy" rel="noopener noreferrer"&gt;static CPU manager policy&lt;/a&gt; must be used, which provides exclusive CPU allocation.  Just enable the policy in the Kubelet configuration file:&lt;br&gt;
&lt;code&gt;cpuManagerPolicy: static&lt;/code&gt;&lt;br&gt;
With the flag set to “static,” containers are allocated exclusive CPUs on the nodes in a cluster.  Kubernetes assigns the container specific CPUs and it runs only on those cores.  The big challenges with CPU pinning are overhead and scalability.  When you manage pinned workloads it requires detailed planning to avoid fragmentation and underutilization.  CPU pinning is good for workloads that are sensitive to CPU throttling but not ideal for volatile and dynamic workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  CPU Throttling is a Double-Edged Sword in Kubernetes
&lt;/h2&gt;

&lt;p&gt;While CPU throttling plays a crucial role in resource management and stability, it can also hinder application performance if not managed correctly. By understanding how CPU throttling works and implementing best practices, you can optimize your Kubernetes environment, ensuring efficient resource use and enhanced application performance. As Kubernetes continues to grow and evolve, keeping a close eye on resource management will be key to maintaining robust and responsive applications.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>containers</category>
      <category>containerapps</category>
    </item>
    <item>
      <title>Observability talks sure to make waves at KubeCon</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Fri, 01 Nov 2024 15:15:22 +0000</pubDate>
      <link>https://forem.com/causely/observability-talks-sure-to-make-waves-at-kubecon-29i5</link>
      <guid>https://forem.com/causely/observability-talks-sure-to-make-waves-at-kubecon-29i5</guid>
      <description>&lt;p&gt;Author: &lt;a class="mentioned-user" href="https://dev.to/enlin_xu_3050bde9796a6fe9"&gt;@enlin_xu_3050bde9796a6fe9&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/" rel="noopener noreferrer"&gt;KubeCon North America 2024&lt;/a&gt; is around the corner! This year I’m especially excited, as it’s my first KubeCon since we launched &lt;a href="https://www.causely.io/?utm_source=dev.to&amp;amp;utm_medium=causely_organization&amp;amp;utm_campaign=kubecon"&gt;Causely&lt;/a&gt;. The energy at KubeCon is unmatched, and it’s a great opportunity to catch up with familiar faces and make new connections in the community.&lt;/p&gt;

&lt;p&gt;Cloud-native and open source technologies are foundational to everything we’re building at Causely, and I’m looking forward to diving into the latest developments with observability tools that will shape the reliability of countless modern applications. We’re excited about how observability tools, such as Prometheus, OpenTelemetry, Grafana Beyla, and Odigos, are improving how systems are monitored and understood. These tools will underpin the reliability engineering strategy of countless modern application environments.&lt;/p&gt;

&lt;p&gt;In this post, I’ll unpack some of the exciting innovations happening in the open source observability space, and highlight specific talks at KubeCon 2024 I’m looking forward to attending. Add them to your schedule if this is an area you’re following too, and I’ll see you there!&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s New in the Observability Landscape
&lt;/h2&gt;

&lt;p&gt;The observability space is evolving rapidly. Several key developments with OpenTelemetry and eBPF are reshaping how we approach monitoring and tracing in distributed systems. This helps make metric collection and auto-instrumentation easier and more flexible than ever.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prometheus and OpenTelemetry are even better together
&lt;/h3&gt;

&lt;p&gt;The collaboration between Prometheus and OpenTelemetry is delivering a more cohesive experience for capturing system metrics. Here’s what’s new:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using the OTel Collector’s Prometheus Receiver:&lt;/strong&gt; OpenTelemetry now allows for streamlined ingestion of Prometheus metrics, creating a more unified data pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exploring OTel-Native Metric Collection Options:&lt;/strong&gt; For those deeply involved in Kubernetes monitoring, tools like Kubernetes Cluster Receiver and the Kubeletstats Receiver provide robust options for flexible metric collection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These integrations create a powerful foundation for system insights that can fuel everything from troubleshooting to strategic infrastructure optimizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Odigos makes migration to OpenTelemetry easy
&lt;/h3&gt;

&lt;p&gt;Transitioning from proprietary observability tools can be challenging.  If you’re looking to transition from proprietary observability tools to OpenTelemetry, Odigos is a great enabler. Here’s why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simplified Migration:&lt;/strong&gt; Odigos takes the complexity out of moving to OpenTelemetry, helping reduce the friction and downtime that can accompany large-scale tooling changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access to Enhanced Capabilities:&lt;/strong&gt; With OpenTelemetry, you gain access to a broader ecosystem, opening doors to new integrations and data visualizations that enrich your observability setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Streamline eBPF-based auto-instrumentation
&lt;/h3&gt;

&lt;p&gt;Combining Grafana Beyla with Grafana Alloy makes eBPF-powered observability easy and minimally intrusive. Whether you’re working with standalone systems or Kubernetes clusters, this integration provides high-precision monitoring capabilities without heavy overhead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yivdi1mofnkq3mrh037.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yivdi1mofnkq3mrh037.png" alt="KubeCon NA 2024" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  KubeCon 2024 Deep Dives and Hands-On Sessions
&lt;/h2&gt;

&lt;p&gt;The schedule at KubeCon North America 2024 will feature several sessions dedicated to observability. Here are some highlights I’m looking forward to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://sched.co/1iW8e" rel="noopener noreferrer"&gt;OpenTelemetry: The OpenTelemetry Hero’s Journey – Working with Open Source Observability&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Takeaway:&lt;/em&gt; Dive into the current capabilities of OpenTelemetry, including correlated metrics, traces, and logs for a complete observability picture. The talk also addresses gaps in today’s open source observability tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://sched.co/1iW8h" rel="noopener noreferrer"&gt;Inspektor Gadget: eBPF for Observability, Made Easy and Approachable&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Takeaway:&lt;/em&gt; This project lightning talk will explain how Inspektor Gadget simplifies eBPF distribution and deployment, allowing you to build fast, efficient data collection pipelines that plug into popular observability tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sched.co/1i7lA" rel="noopener noreferrer"&gt;Optimizing LLM Performance in Kubernetes with OpenTelemetry&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Takeaway:&lt;/em&gt; Speakers Ashok Chandrasekar (Google) and Liudmila Molkova (Microsoft) will help you gain practical insights into observing and optimizing Large Language Model (LLM) deployments on Kubernetes. This session covers everything from client and server tracing with OpenTelemetry to advanced autoscaling strategies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sched.co/1i7lJ" rel="noopener noreferrer"&gt;Unifying Observability: Correlating Metrics, Traces, and Logs with Exemplars and OpenTelemetry&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Takeaway:&lt;/em&gt; Speakers Kruthika Prasanna Simha and Charlie Le (Apple) will help attendees learn how to correlate data across metrics, traces, and logs, with exemplars. This session demonstrates practical visualization techniques in Grafana, making it easy to move from high-level metrics down to detailed traces.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sched.co/1i7pF" rel="noopener noreferrer"&gt;Now You See Me: Tame MTTR with Real-Time Anomaly Detection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Takeaway:&lt;/em&gt; Speakers Kruthika Prasanna Simha and Raj Bhensadadia (Apple) will dive into the latest in real-time anomaly detection, with insights into applying machine learning to time series data in cloud-native environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find Causely at KubeCon 2024!
&lt;/h2&gt;

&lt;p&gt;If the above topics are also interesting to you, we’d love to meet up. At Causely, we’re passionate about helping organizations unlock the full potential of their observability data to continuously assure service reliability. We believe that flying with overwhelming volumes of observability data is just as bad as flying blind.&lt;/p&gt;

&lt;p&gt;Here’s where you can find us at KubeCon:&lt;/p&gt;

&lt;p&gt;🥂 &lt;strong&gt;Come to our happy hour!&lt;/strong&gt; We’re co-hosting a &lt;a href="https://lu.ma/d8dz3bal" rel="noopener noreferrer"&gt;happy hour&lt;/a&gt; with friends from NVIDIA, Alma Security, Edera, and 645 Ventures on November 12th.&lt;br&gt;
🦈 &lt;strong&gt;Find the shark!&lt;/strong&gt; Look for a shark at the show on the afternoon of November 13th. Here’s a hint: &lt;em&gt;she’ll be holding something sweet.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>observability</category>
      <category>kubernetes</category>
      <category>opensource</category>
    </item>
    <item>
      <title>The use of eBPF – in Netflix, GPU infrastructure, Windows programs and more</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Mon, 30 Sep 2024 15:43:42 +0000</pubDate>
      <link>https://forem.com/causely/the-use-of-ebpf-in-netflix-gpu-infrastructure-windows-programs-and-more-b69</link>
      <guid>https://forem.com/causely/the-use-of-ebpf-in-netflix-gpu-infrastructure-windows-programs-and-more-b69</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted to &lt;a href="https://www.causely.io/blog/the-use-of-ebpf-in-netflix-gpu-infrastructure-windows-programs-and-more/?utm_source=dev.to&amp;amp;utm_medium=org_profile&amp;amp;utm_campaign=ebpf"&gt;causely.io&lt;/a&gt; by Will Searle&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways from eBPF Summit 2024
&lt;/h2&gt;

&lt;p&gt;How are organizations applying eBPF to solve real problems in observability, security, profiling, and networking? It’s a question I’ve found myself asking as I work in and around the observability space – and I was pleasantly surprised when Isovalent’s recent eBPF Summit provided some answers.&lt;/p&gt;

&lt;p&gt;For those new to eBPF, it’s an open source technology that empowers observability practices. Many organizations and vendors have adopted it as a data source (including &lt;a href="https://www.causely.io/?utm_source=dev.to&amp;amp;utm_medium=org_profile&amp;amp;utm_campaign=ebpf"&gt;Causely&lt;/a&gt;, where we use it to enhance our instrumentation for Kubernetes).&lt;/p&gt;

&lt;p&gt;Many of the eBPF sessions highlighted real challenges companies faced and how they used eBPF to overcome them. In the spirit of helping others, my cliff notes and key takeaways from eBPF Summit are below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Organizations like Netflix and Datadog are using eBPF in new, creative ways
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The use of eBPF in Netflix
&lt;/h3&gt;

&lt;p&gt;One of the &lt;a href="https://youtu.be/Pkz65BJHN2M?si=8sV-B_E8WgHbm4-o" rel="noopener noreferrer"&gt;Keynote presentations&lt;/a&gt; was delivered by Shweta Saraf who described specific problems Netflix overcame using eBPF, such as noisy neighbors. This is a common problem faced by many companies with cloud-native environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/Pkz65BJHN2M?si=wST1Qc8Z7XcfBcZX" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15qjoh4d1n6wxvfvqum6.png" alt="Shweta Saraf described Netflix’s use cases for eBPF" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Netflix uses eBPF to measure how long processes spend in the CPU scheduled state.  When processes are taking too long, it usually indicates a performance bottleneck on CPU resources — like CPU throttling or over-allocation.  (Netflix’s compute and performance team released a &lt;a href="https://netflixtechblog.com/noisy-neighbor-detection-with-ebpf-64b1f4b3bbdd" rel="noopener noreferrer"&gt;blog&lt;/a&gt; recently with much more detail on the subject.)  In solving the noisy neighbor problem, the Netflix team also created a tool called bpftop which is designed to measure the CPU usage of the eBPF code they instrumented.&lt;/p&gt;

&lt;p&gt;The Netflix team released &lt;a href="https://github.com/Netflix/bpftop" rel="noopener noreferrer"&gt;bpftop&lt;/a&gt; for the community to use, and it will ultimately help organizations implement efficient eBPF programs.  This is especially useful if an eBPF program is hung, allowing teams to quickly identify any overhead that an eBPF program has.  We have come full circle: &lt;strong&gt;&lt;em&gt;monitoring our monitoring programs&lt;/em&gt;&lt;/strong&gt; 😁.&lt;/p&gt;

&lt;h3&gt;
  
  
  The use of eBPF in Datadog
&lt;/h3&gt;

&lt;p&gt;Another use case for eBPF – and one that can be easily overlooked – is in chaos engineering.  Scott Gerring, a technical advocate at Datadog, shared his experience on the matter.  This quote resonated with me: “with eBPF… we have this universal language of destruction” – controlled destruction that is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/_5Zabryx0nE?si=n3vlWdW-wBygE_Fr" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxdki1n4uzmtvpzgjmbd.png" alt="Scott Gerring discussed eBPF’s use in Datadog" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefit of eBPF is that we can inject failures into cloud-native systems without having to re-write the code of an application.  Interestingly, there are open source projects out there for chaos engineering that already use eBPF, such as &lt;a href="https://github.com/chaos-mesh/chaos-mesh" rel="noopener noreferrer"&gt;ChaosMesh&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Scott listed a few examples like Kernel Probes that are attached to the openat system that will cause access denied errors for 50% of calls made by system processes that a user can select or define.  Or, using the traffic control subsystem to drop packets for sockets on process you want to mark for failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  eBPF will underpin AI development
&lt;/h2&gt;

&lt;p&gt;Isovalent Co-founder and CTO Thomas Graf presented the eBPF roadmap and what he is most excited about.  Notably: eBPF will deliver value in enabling the GPU and DPU infrastructure wave fueled by AI.  AI is undoubtably one of the hottest topics in tech right now.  Many companies are using GPUs and DPUs to accelerate AI and ML (Machine Learning) tasks, because CPUs cannot deliver the processing power demanded by today’s AI models.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/oVoW5BUBRJk?si=MbFhH8fbtRMd-eQk" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fui5dgi2oanogxldloy1m.png" alt="Thomas Graf talked about the value of eBPF in enabling GPU and DPU infrastructures" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As Tom mentioned, whether the AI wave produces anything meaningful is up for debate, but companies will undoubtedly try, and they will make significant investments in GPUs and DPUs along the way.  The capabilities of eBPF will be applied to this new wave of infrastructure in the same manner they did for CPUs.&lt;/p&gt;

&lt;p&gt;GPUs and DPUs are expensive, so companies do not want to waste processing power on programs that will drive up utilization. The efficiency of eBPF programs can help maximize the performance of costly GPUs. For example, eBPF can be used for GPU profiling by hooking into GPU events such as memory, sync, and kernel launches.  Unlocking this type of data can be used to understand which kernels are used most frequently, improving efficiencies of AI development.&lt;/p&gt;

&lt;h2&gt;
  
  
  eBPF support for Windows is growing
&lt;/h2&gt;

&lt;p&gt;Another interesting milestone in eBPF’s journey is the support for Windows.  In fact, there is a growing Git Repository for eBPF programs on Windows that exists today: &lt;a href="https://github.com/microsoft/ebpf-for-windows" rel="noopener noreferrer"&gt;https://github.com/microsoft/ebpf-for-windows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project supports Windows 10 or later and Windows Server 2019 or later, and while there is not feature parity yet to Linux, there is a lot of development in this space.  The community is hard at work porting over the same tooling for eBPF on Linux, but it is a challenging endeavor as the hook points for Linux eBPF components (like Just-In-Time compilation or eBPF bytecode signatures) will differ on Windows.&lt;/p&gt;

&lt;p&gt;It will be exciting to watch the same networking, security, and observability eBPF capabilities on Linux become available for Windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The need for better observability is fueling eBPF ecosystem growth
&lt;/h2&gt;

&lt;p&gt;eBPF tools have been created by the community for both applications and infrastructure use cases.  There a 9 major projects for applications and over 30 exciting emerging projects for applications.  Notably, while there are a few production-ready runtimes and tools within the infrastructure ecosystem (like Linux and LLVM Compiler), there are many emerging projects such as eBPF for Windows.&lt;/p&gt;

&lt;p&gt;With a user base across Meta, Apple, Capital One, LinkedIn, and Walmart (just to name a few), we can expect the number of eBPF projects to grow considerably in the coming years.  The overall number of projects is actually forecasted in the triple digits by the end of 2025.&lt;/p&gt;

&lt;p&gt;One of the top catalysts for growth? The urgent need for better observability.  Of all the topics at last year’s KubeCon in Chicago, observability ranked the highest, beating competing topics like cost and automation.  As with any other tool, eBPF can allow organizations gather a lot of data, but the “why” is important. Are you using that data to create more noise and more alerts, or can you apply it to get to the root cause of problems that surface, or for other applications?&lt;/p&gt;

&lt;p&gt;It is exciting to watch the eBPF community develop and implement creative new ways to use eBPF and the 2024 eBPF summit was (and still is) an excellent source of real-world eBPF use cases and community-generated tooling.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>opensource</category>
      <category>observability</category>
      <category>ebpf</category>
    </item>
    <item>
      <title>Preventing Out-of-Memory (OOM) Kills in Kubernetes: Tips for Optimizing Container Memory Management</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Mon, 23 Sep 2024 15:34:26 +0000</pubDate>
      <link>https://forem.com/causely/preventing-out-of-memory-oom-kills-in-kubernetes-tips-for-optimizing-container-memory-management-1pi5</link>
      <guid>https://forem.com/causely/preventing-out-of-memory-oom-kills-in-kubernetes-tips-for-optimizing-container-memory-management-1pi5</guid>
      <description>&lt;p&gt;Running containerized applications at scale with Kubernetes demands careful resource management. One very complicated but common challenge is preventing Out-of-Memory (OOM) kills, which occur when a container’s memory consumption surpasses its allocated limit. This brutal termination by the Kubernetes kernel’s OOM killer disrupts application stability and can affect application availability and the health of your overall environment.&lt;/p&gt;

&lt;p&gt;In this post, we’ll explore the reasons that OOM kills can occur and provide tactics to combat and prevent them.&lt;/p&gt;

&lt;p&gt;Before diving in, it’s worth noting that OOM kills represent one symptom that can have a variety of root causes. It’s important for organizations to implement a system that solves the root cause analysis problem with speed and accuracy, allowing reliability engineering teams to respond rapidly, and to potentially prevent these occurrences in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep dive into an OOM kill
&lt;/h2&gt;

&lt;p&gt;An Out-Of-Memory (OOM) kill in &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=oom_kill"&gt;Kubernetes&lt;/a&gt; occurs when a container exceeds its memory limit, causing the Kubernetes kernel’s OOM killer to terminate the container. This impacts application stability and requires immediate attention.&lt;/p&gt;

&lt;p&gt;Several factors can trigger OOM kills in your Kubernetes environment, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory limits exceeded:&lt;/strong&gt; This is the most common culprit. If a container consistently pushes past its designated memory ceiling, the OOM killer steps in to prevent a system-wide meltdown.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory leaks:&lt;/strong&gt; Applications can develop memory leaks over time, where they allocate memory but fail to release it properly. This hidden, unexpected growth eventually leads to OOM kills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource overcommitment:&lt;/strong&gt; Co-locating too many resource-hungry pods onto a single node can deplete available memory. When the combined memory usage exceeds capacity, the OOM killer springs into action.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bursting workloads:&lt;/strong&gt; Applications with spiky workloads can experience sudden memory surges that breach their limits, triggering OOM kills.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As an example, a web server that experiences a memory leak code bug may gradually consume more and more memory until the OOM killer intervenes to prevent a crash.&lt;/p&gt;

&lt;p&gt;Another case could be when a Kubernetes cluster over-commits resources by scheduling too many pods on a single node. The OOM killer may need to step in to free up memory and ensure system stability.&lt;/p&gt;

&lt;h2&gt;
  
  
  The devastating effects of OOM kills: Why they matter
&lt;/h2&gt;

&lt;p&gt;OOM kills aren’t normally occurring events. They can trigger a cascade of negative consequences for your applications and the overall health of the cluster, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Application downtime:&lt;/strong&gt; When a container is OOM-killed, it abruptly terminates, causing immediate application downtime. Users may experience service disruptions and outages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data loss:&lt;/strong&gt; Applications that rely on in-memory data or stateful sessions risk losing critical information during an OOM kill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance degradation:&lt;/strong&gt; Frequent OOM kills force containers to restart repeatedly. This constant churn degrades overall application performance and user experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service disruption:&lt;/strong&gt; Applications often interact with each other. An OOM kill in one container can disrupt inter-service communication, causing cascading failures and broader service outages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a container running a critical database service experiences an OOM kill, it could result in data loss and corruption. This leads to service disruptions for other containers that rely on the database for information, causing cascading failures across the entire application ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Combating OOM kills
&lt;/h2&gt;

&lt;p&gt;There are a few different tactics to combat OOM kills in attempt to operate a memory-efficient Kubernetes environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set appropriate resource requests and limits
&lt;/h3&gt;

&lt;p&gt;For example, you can set a memory request of 200Mi and a memory limit of 300Mi for a particular container in your Kubernetes deployment. Requests ensure the container gets at least 200Mi of memory, while limits cap it at 300Mi to prevent excessive consumption.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources:

  requests:

    memory: "200Mi"

  limits:

    memory: "300Mi"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While this may mitigate potential memory use issues, it is a very manual process and does not deal at all with the dynamic nature of what we can achieve with Kubernetes. It also doesn’t solve the source issue, which may be a code-level problem triggering memory leaks or failed GC processes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transition to autoscaling
&lt;/h3&gt;

&lt;p&gt;Leveraging &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=oom_kill"&gt;autoscaling&lt;/a&gt; capabilities is a core dynamic option for resource allocation. There are two autoscaling methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vertical Pod Autoscaling (VPA):&lt;/strong&gt; &lt;a href="https://kubernetes.io/docs/concepts/workloads/autoscaling/" rel="noopener noreferrer"&gt;VPA&lt;/a&gt; dynamically adjusts resource limits based on real-time memory usage patterns. This ensures containers have enough memory to function but avoids over-provisioning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Horizontal Pod Autoscaling (HPA):&lt;/strong&gt; &lt;a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="noopener noreferrer"&gt;HPA&lt;/a&gt; scales the number of pods running your application up or down based on memory utilization. This distributes memory usage across multiple pods, preventing any single pod from exceeding its limit. The following HPA configuration shows an example of scaling based on memory usage:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: autoscaling/v2beta2

kind: HorizontalPodAutoscaler

metadata:

  name: my-app-hpa

spec:

  scaleTargetRef:

    apiVersion: apps/v1

    kind: Deployment

    name: my-app

  minReplicas: 2

  maxReplicas: 10

  metrics:

    - type: Resource

      resource:

        name: memory

        target:

          type: Utilization

          averageUtilization: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Monitor memory usage
&lt;/h3&gt;

&lt;p&gt;Proactive monitoring is key. For instance, you can configure &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=oom_kill"&gt;Prometheus&lt;/a&gt; to scrape memory metrics from your Kubernetes pods every 15 seconds and set up &lt;a href="https://grafana.com/" rel="noopener noreferrer"&gt;Grafana&lt;/a&gt; dashboards to visualize memory usage trends over time. Additionally, you can create alerts in Prometheus to trigger notifications when memory usage exceeds a certain threshold.&lt;/p&gt;

&lt;h3&gt;
  
  
  Optimize application memory usage
&lt;/h3&gt;

&lt;p&gt;Don’t underestimate the power of code optimization. Address memory leaks within your applications and implement memory-efficient data structures to minimize memory consumption.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pod disruption budgets (PDB)
&lt;/h3&gt;

&lt;p&gt;When deploying updates, &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=oom_kill"&gt;PDBs&lt;/a&gt; ensure a minimum number of pods remain available, even during rollouts. This mitigates the risk of widespread OOM kills during deployments. Here is a PDB configuration example that helps ensure minimum pod availability.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: policy/v1

kind: PodDisruptionBudget

metadata:

  name: my-app-pdb

spec:

  minAvailable: 80%

  selector:

    matchLabels:

      app: my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Manage node resources
&lt;/h3&gt;

&lt;p&gt;You can apply a node selector to ensure that a memory-intensive pod is only scheduled on nodes with a minimum of 8GB of memory. Additionally, you can use taints and tolerations to dedicate specific nodes with high memory capacity for memory-hungry applications, preventing OOM kills due to resource constraints.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nodeSelector:

  disktype: ssd

tolerations:

  - key: "key"

    operator: "Equal"

    value: "value"

    effect: "NoSchedule"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use QoS classes
&lt;/h3&gt;

&lt;p&gt;Kubernetes offers Quality of Service (&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/" rel="noopener noreferrer"&gt;QoS&lt;/a&gt;) classes that prioritize resource allocation for critical applications. Assign the highest QoS class to applications that can least tolerate OOM kills. Here is a sample resource configuration with QoS parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources:

  requests:

    memory: "1Gi"

    cpu: "500m"

  limits:

    memory: "1Gi"

    cpu: "500m"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are a few potential strategies to help prevent OOM kills. The challenge comes with the frequency with which they can occur, and the risk to your applications when they happen.&lt;/p&gt;

&lt;p&gt;As you can imagine, it’s not possible to manually manage resource utilization, and guarantee the stability and performance of your containerized applications within your Kubernetes environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manual thresholds = Rigidity and risk
&lt;/h2&gt;

&lt;p&gt;These techniques can help reduce the risk of OOM kills. The issue is not entirely solved though. By setting manual thresholds and limits, you’re removing many of the dynamic advantages of Kubernetes.&lt;/p&gt;

&lt;p&gt;A more ideal way to solve the OOM kill problem is to use adaptive, dynamic resource allocation. Even if you get resource allocation right on initial deployment, there are many factors that change that affect how your application consumes resources. There is also a risk because application and resource issues don’t just affect one pod, or one container. Resource issues can reach every part of the cluster and degrade the other running applications and services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which strategy works best to prevent OOM kills?
&lt;/h2&gt;

&lt;p&gt;Vertical Pod Autoscaling (VPA) and Horizontal Pod Autoscaling (HPA) are common strategies used to manage resource limits in Kubernetes containers. VPA adjusts resource limits based on real-time memory usage patterns, while HPA scales pods based on memory utilization.&lt;/p&gt;

&lt;p&gt;Monitoring with tools like Prometheus may help with the troubleshooting of memory usage trends. Optimizing application memory usage is no easy feat because it’s especially challenging to identify whether it is infrastructure or code causing the problem.&lt;/p&gt;

&lt;p&gt;Pod Disruption Budgets (PDB) may help ensure a minimum number of pods remain available during deployments, while node resources can be managed using node selectors and taints. Quality of Service (QoS) classes prioritize resource allocation for critical applications.&lt;/p&gt;

&lt;p&gt;One thing is certain: OOM kills are a common and costly challenge to manage using traditional monitoring tools and methods.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://www.causely.io?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=oom_kill"&gt;Causely&lt;/a&gt;, we’re focused on applying causal reasoning software to help organizations keep applications healthy and resilient. By automating root cause analysis, issues like OOM kills can be resolved in seconds, and unintended consequences of new releases or application changes can be avoided.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>container</category>
      <category>containerapps</category>
      <category>microservices</category>
    </item>
    <item>
      <title>The “R” in MTTR: Repair or Recover? What’s the difference?</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Wed, 18 Sep 2024 13:28:50 +0000</pubDate>
      <link>https://forem.com/causely/the-r-in-mttr-repair-or-recover-whats-the-difference-1ooi</link>
      <guid>https://forem.com/causely/the-r-in-mttr-repair-or-recover-whats-the-difference-1ooi</guid>
      <description>&lt;p&gt;&lt;em&gt;Author: &lt;a href="https://www.linkedin.com/in/will-searle-209a9222/" rel="noopener noreferrer"&gt;Will Searle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding meaning in a world of acronyms
&lt;/h2&gt;

&lt;p&gt;There are so many ways to measure application reliability today, with hundreds of key performance indicators (KPIs) to measure availability, error rates, user experiences, and quality of service (QoS). Yet every organization I speak with struggles to effectively use these metrics.  Some applications and services require custom metrics around reliability while others can be measured with just uptime vs. downtime.&lt;/p&gt;

&lt;p&gt;In my role at &lt;a href="https://www.causely.io?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=mttr"&gt;Causely&lt;/a&gt;, I work with companies every day who are trying to improve the reliability, resiliency, and agility of their applications. One method of measuring reliability that I keep a close eye on is MTT(XYZ).  Yes, I made that up, but it’s meant to capture all the different variations of mean time to “X” out there.  We have MTTR, MTTI, MTTF, MTTA, MTBF, MTTD, and the list keeps going.  In fact, some of these acronyms have multiple definitions.  The one whose meaning I want to discuss today is MTTR.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what’s the meaning of MTTR anyway?
&lt;/h2&gt;

&lt;p&gt;Before cloud-native applications, MTTR meant one thing – Mean Time to Repair. It’s a metric focused on how quickly an organization can respond to and fix problems that cause downtime or performance degradation.  It’s simple to calculate too:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupif7c432b5vlzkvkq1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fupif7c432b5vlzkvkq1e.png" alt="MTTR meaning: How to calculate" width="480" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Total time spent on repairs is the length of time IT spends fixing issues, and number of repairs is the number of times a fix has been implemented.  Some organizations look at this over a week or a month in production. It’s a great metric to understand how resilient your system is and how quickly the team can fix a known issue.  Unfortunately, data suggests that most IT organizations’ &lt;a href="https://www.cncf.io/blog/2024/04/18/the-challenges-of-rising-mttr-and-what-to-do/" rel="noopener noreferrer"&gt;MTTR is increasing every year&lt;/a&gt;, despite massive investments in the observability stack.&lt;/p&gt;

&lt;p&gt;For monolithic applications, MTTR has historically been an excellent measurement; as soon as a fix is applied, the entire application is usually back online and performing well.  Now that IT is moving toward serverless and cloud-native applications, it is a much different story.  When a failure occurs in Kubernetes – where there are many different containers, services, applications, and more  all communicating in real time – the entire system can take much longer to &lt;strong&gt;recover&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The new MTTR: Mean Time to Recover
&lt;/h2&gt;

&lt;p&gt;I am seeing more and more organizations redefine the meaning of MTTR from “mean time to repair” to “mean time to &lt;strong&gt;recover&lt;/strong&gt;.”  Recover means that not only is everything back online, but the system is performing well and satisfying any QoS or SLAs &lt;strong&gt;AND&lt;/strong&gt; a preventative approach has been implemented.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqab3pyjv0vz503w9tu9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqab3pyjv0vz503w9tu9.png" alt="MTTx" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, take a common problem within Kubernetes: a pod enters a CrashLoopBackoff state.  There are many reasons why a pod might continuously restart including deployment errors, resourcing constraints, DNS resolution errors, missing K8s dependencies, etc.  But let’s say you completed your investigation and found out that your pod did not have sufficient memory and therefore was crashing/restarting.  So you increased the limit on the container or the deployment and the pod(s) seems to be running fine for a bit…. but wait, it just got evicted.&lt;/p&gt;

&lt;p&gt;The node now has increased memory usage and pods are being evicted.  Or, what if now we created noisy neighbors, and that pod is “stealing” resources like memory from others on the same node?  This is why organizations are moving away from &lt;strong&gt;repair&lt;/strong&gt; because sometimes when the applied fix brings everything online, it doesn’t mean the system is healthy. “Repaired” can be a subjective term. Furthermore, sometimes the fix is merely a band-aid, and the problem returns hours, days, or weeks later.&lt;/p&gt;

&lt;p&gt;Waiting for the entire application system to become healthy and applying a preventative measure will get us better insight into reliability.  It is a more accurate way to measure how long it takes from a failure event to a healthy environment.  After all, just because something is online does not mean it is performing well.  The tricky issue here is: How do you measure “healthy”?   In other words, how do we know the entire system is healthy and our preventative patch is truly preventing problems?  There are some good QoS benchmarks like response time or transactions per second, but there is usually some difficulty in defining these thresholds.  An improvement in MTBF (mean time between failures) is another good benchmark to test to see if your preventative approach is working.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can we improve Mean Time to Recover?
&lt;/h2&gt;

&lt;p&gt;There are many ways to improve system recovery, and ultimately the best way to improve MTTR is to improve all the MTT(XYZ) that come before it on incident management timelines.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automation:&lt;/strong&gt; Automating tasks like ticket creation, assigning incidents to appropriate teams, and probably most importantly, automating the fix can all help reduce the time from problem identification to recovery.  But, the more an organization scrutinizes every single change and configuration, the longer it takes to implement a fix.  Becoming less strict drives faster results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Well-defined Performance Benchmarks:&lt;/strong&gt; Lots of customers I speak with have a couple KPIs they track, but the more specific the better.  For example, instead of making a blanket statement that every application needs to have 200ms of response time or less,  set these metrics on an app by app basis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Engineering:&lt;/strong&gt; This is an often-overlooked &lt;a href="https://www.splunk.com/en_us/blog/learn/chaos-engineering.html#:~:text=Improve%20failure%20recovery%20%2D%20Since%20chaos%20tests,engineering%20enhances%20failure%20recovery%20and%20reduces%20downtime" rel="noopener noreferrer"&gt;methodology to improve recovery rate&lt;/a&gt;.  Practicing and simulating failures helps improve how quickly we can react, troubleshoot, and apply a fix.  It does take a lot of time though, so it is not an easy strategy to adhere to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Alerting Mechanisms:&lt;/strong&gt; This is simple: The faster we get notified of a problem, the quicker we can fix it.  We need to not just identify the symptoms but also quickly find the root cause.  I see many companies try to set up proactive alerts, but they often get more smoke than fire.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge Base:&lt;/strong&gt; This was so helpful for me in a previous role. Building a KB in a system like Atlassian, SharePoint, or JIRA can help immensely in the troubleshooting process.  The KB needs to be searchable and always changing as the environment evolves.  Being able to search for a specific string in an error message within a KB can immediately highlight not just a root cause but also a fix.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To summarize, MTTR is a metric that needs to capture the state of a system from the moment of failure until the entire system is healthy again.  This is a much more accurate representation of how fast we recover from a problem, and how resilient the application architecture is.  MTTR is a principle that extends beyond the world of IT; its applications exist in security, mechanics, even healthcare.  Just remember, a good surgeon is not only measured by how fast he can repair a broken bone, but by how fast the patient can recover.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Improving application resilience and reliability is something we spend a lot of time thinking about at Causely. We’d love to hear how you’re handling this today, and what metric you’ve found most useful toward this goal. Comment here or &lt;a href="https://www.causely.io/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=mttr#contact"&gt;contact us&lt;/a&gt; with your thoughts!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloudnative</category>
      <category>sre</category>
    </item>
    <item>
      <title>Understanding the Kubernetes Readiness Probe: A Tool for Application Health</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Tue, 13 Aug 2024 20:51:36 +0000</pubDate>
      <link>https://forem.com/causely/understanding-the-kubernetes-readiness-probe-a-tool-for-application-health-3jfc</link>
      <guid>https://forem.com/causely/understanding-the-kubernetes-readiness-probe-a-tool-for-application-health-3jfc</guid>
      <description>&lt;p&gt;Application reliability is a dynamic challenge, especially in cloud-native environments. Ensuring that your applications are running smoothly is make-or-break when it comes to user experience. One essential tool for this is the &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=K8s_readiness_probe"&gt;Kubernetes readiness probe&lt;/a&gt;. This post will explore the concept of a readiness probe, explaining how it works and why it’s a key component for managing your Kubernetes clusters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Kubernetes Readiness Probe?
&lt;/h2&gt;

&lt;p&gt;A readiness probe is essentially a check that Kubernetes performs on a container to ensure that it is ready to serve traffic. This check is needed to prevent traffic from being directed to containers that aren’t fully operational or are still in the process of starting up.&lt;/p&gt;

&lt;p&gt;By using readiness probes, Kubernetes can manage the flow of traffic to only those containers that are fully prepared to handle requests, thereby improving the overall stability and performance of the application.&lt;/p&gt;

&lt;p&gt;Readiness probes also help in preventing unnecessary disruptions and downtime by only including healthy containers in the load balancing process. This is an essential part of a comprehensive SRE operational practice for maintaining the health and efficiency of your Kubernetes clusters.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Readiness Probes Work
&lt;/h2&gt;

&lt;p&gt;Readiness probes are configured in the pod specification and can be of three types:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Probes:&lt;/strong&gt; These probes send an HTTP request to a specified endpoint. If the response is successful, the container is considered ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TCP Probes:&lt;/strong&gt; These probes attempt to open a TCP connection to a specified port. If the connection is successful, the container is considered ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command Probes:&lt;/strong&gt; These probes execute a command inside the container. If the command returns a zero exit status, the container is considered ready.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below is an example demonstrating how to configure a readiness probe in a Kubernetes deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1

kind: Pod

metadata:

  name: readiness-example

spec:

  containers:

  - name: readiness-container

    image: your-image

    readinessProbe:

      httpGet:

        path: /healthz

        port: 8080

      initialDelaySeconds: 5

      periodSeconds: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This YAML file defines the Kubernetes pod with a readiness probe configured based on the following parameters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;apiVersion: v1&lt;/strong&gt; – Specifies the API version used for the configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kind: Pod&lt;/strong&gt; – Indicates that this configuration is for a Pod.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;metadata:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;name: readiness-example&lt;/strong&gt; – Sets the name of the Pod to “readiness-example.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;spec&lt;/strong&gt; – Describes the desired state of the Pod.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;containers&lt;/strong&gt;:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;name: readiness-container&lt;/strong&gt; – Names the container within the Pod as “readiness-container.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;image: your-image&lt;/strong&gt; – Specifies the container image to use, named “your-image.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;readinessProbe&lt;/strong&gt; – Configures a readiness probe to check if the container is ready to receive traffic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;httpGet:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;path: /healthz&lt;/strong&gt; – Sends an HTTP GET request to the /healthz path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;port: 8080&lt;/strong&gt; – Targets port 8080 for the HTTP GET request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;initialDelaySeconds: 5&lt;/strong&gt; – Waits 5 seconds before performing the first probe after the container starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;periodSeconds: 10&lt;/strong&gt; – Repeats the probe every 10 seconds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This relatively simple configuration creates a Pod named “readiness-example” with a single container running “your-image.” It includes a readiness probe that checks the /healthz endpoint on port 8080, starting 5 seconds after the container launches and repeating every 10 seconds to determine if the container is ready to accept traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance of Readiness Probes
&lt;/h2&gt;

&lt;p&gt;The goal is to make sure you can prevent traffic from being directed to a container that is still starting up or experiencing issues. This helps maintain the overall stability and reliability of your application by only sending traffic to containers that are ready to handle it.&lt;/p&gt;

&lt;p&gt;Readiness probes can be used in conjunction with &lt;a href="https://www.causely.io/resources/glossary-cloud-native-technologies/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=K8s_readiness_probe"&gt;liveness probes&lt;/a&gt; to further enhance the health checking capabilities of your containers.&lt;/p&gt;

&lt;p&gt;Readiness probes are important for a few reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prevent traffic to unready pods:&lt;/strong&gt; They ensure that only ready pods receive traffic, preventing downtime and errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Facilitate smooth rolling updates:&lt;/strong&gt; By making sure new pods are ready before sending traffic to them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced application stability:&lt;/strong&gt; They can help with the overall stability and reliability of your application by managing traffic flow based on pod readiness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember that your readiness probes only check for availability, and don’t understand why a container is not available. Readiness probe failure is a symptom that can manifest from many root causes. It’s important to know the purpose, and limitations before you rely too heavily on them for overall application health.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Configuring Readiness Probes
&lt;/h2&gt;

&lt;p&gt;To make the most of Kubernetes readiness probes, consider the following practices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define Clear Health Endpoints:&lt;/strong&gt; Ensure your application exposes a clear and reliable health endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set Appropriate Timing:&lt;/strong&gt; Configure initialDelaySeconds and periodSeconds based on your application’s startup and response time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor and Adjust:&lt;/strong&gt; Continuously monitor the performance and adjust the probe configurations as needed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For example, if your application requires a database connection to be fully established before it can serve requests, you can set up a readiness probe that checks for the availability of the database connection.&lt;/p&gt;

&lt;p&gt;By configuring the &lt;code&gt;initialDelaySeconds&lt;/code&gt; and &lt;code&gt;periodSeconds&lt;/code&gt; appropriately, you can ensure that your application is only considered ready once the database connection is fully established. This will help prevent any potential issues or errors that may occur if the application is not fully prepared to handle incoming requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations of Readiness Probes
&lt;/h2&gt;

&lt;p&gt;Readiness probes are handy, but they only check for the availability of a specific resource and do not take into account the overall health of the application. This means that even if the database connection is established, there could still be other issues within the application that may prevent it from properly serving requests.&lt;/p&gt;

&lt;p&gt;Additionally, readiness probes do not automatically restart the application if it fails the check, so it is important to monitor the results and take appropriate action if necessary. Readiness probes are still a valuable tool for ensuring the stability and reliability of your application in a Kubernetes environment, even with these limitations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting Kubernetes Readiness Probes: Common Issues and Solutions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Slow Container Start-up
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; If your container’s initialization tasks exceed the initialDelaySeconds of the readiness probe, the probe may fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Increase the initialDelaySeconds to give the container enough time to start and complete its initialization. Additionally, optimize the startup process of your container to reduce the time required to become ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unready Services or Endpoints
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; If your container relies on external services or dependencies (e.g., a database) that aren’t ready when the readiness probe runs, it can fail. Race conditions may also occur if your application’s initialization depends on external factors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Ensure that external services or dependencies are ready before the container starts. Use tools like Helm Hooks or init containers to coordinate the readiness of these components with your application. Implement synchronization mechanisms in your application to handle race conditions, such as using locks, retry mechanisms, or coordination with external components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Misconfiguration of the Readiness Probe
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Misconfigured readiness probes, such as incorrect paths or ports, can cause probe failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Double-check the readiness probe configuration in your Pod’s YAML file. Ensure the path, port, and other parameters are correctly specified.&lt;/p&gt;

&lt;h3&gt;
  
  
  Application Errors or Bugs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Application bugs or issues, such as unhandled exceptions, misconfigurations, or problems with external dependencies, can prevent it from becoming ready, leading to probe failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Debug and resolve application issues. Review application logs and error messages to identify the problems preventing the application from becoming ready. Fix any bugs or misconfigurations in your application code or deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Insufficient Resources
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; If your container is running with resource constraints (CPU or memory limits), it might not have the resources it needs to become ready, especially under heavy loads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Adjust the resource limits to provide the container with the necessary resources. You may also need to optimize your application to use resources more efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conflicts Between Probes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Misconfigured liveness and readiness probes might interfere with each other, causing unexpected behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Ensure that your probes are configured correctly and serve their intended purposes. Make sure that the settings of both probes do not conflict with each other.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cluster-Level Problems
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Kubernetes cluster issues, such as kubelet or networking problems, can result in probe failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Monitor your cluster for any issues or anomalies and address them according to Kubernetes best practices. Ensure that the kubelet and other components are running smoothly.&lt;/p&gt;

&lt;p&gt;These are common issues to keep an eye out for. Watch for problems that the readiness probes are not surfacing or that might be preventing them from acting as expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Ensuring that your applications are healthy and ready to serve traffic is necessary for maximizing uptime. The Kubernetes readiness probe is one helpful tool for managing Kubernetes clusters; it should be a part of a comprehensive Kubernetes operations plan.&lt;/p&gt;

&lt;p&gt;Readiness probes can be configured in pod specifications and can be HTTP, TCP, or command probes. They help prevent disruptions and downtime by ensuring only healthy containers are included in the load-balancing process.&lt;/p&gt;

&lt;p&gt;They also use the prevention of sending traffic to unready pods for smooth rolling updates and enhancing application stability. It’s good practice that your readiness probes include defining clear health endpoints, setting appropriate timing, and monitoring and adjusting configurations.&lt;/p&gt;

&lt;p&gt;Don’t forget that readiness probes have clear limitations, as they only check for the availability of a specific resource and do not automatically restart the application if it fails the check. A Kubernetes readiness probe failure is merely a symptom that can be attributed to many root causes. To automate root cause analysis across your entire Kubernetes environment, check out &lt;a href="https://www.causely.io/platform/causely-for-cloud-native-applications/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=k8s-readiness-probe"&gt;Causely for Cloud-Native Applications&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>sre</category>
    </item>
    <item>
      <title>Unlocking the Power of Causal AI: A Self-Guided Tour of Our Causal Reasoning Platform</title>
      <dc:creator>Karina Babcock</dc:creator>
      <pubDate>Thu, 01 Aug 2024 20:21:20 +0000</pubDate>
      <link>https://forem.com/causely/unlocking-the-power-of-causal-ai-a-self-guided-tour-of-our-causal-reasoning-platform-id7</link>
      <guid>https://forem.com/causely/unlocking-the-power-of-causal-ai-a-self-guided-tour-of-our-causal-reasoning-platform-id7</guid>
      <description>&lt;p&gt;We spend a lot of time unpacking the pain and implications associated with keeping modern application environments healthy and resilient, and surfacing the potential impact Causal AI for DevOps can have. It's time for a solution.&lt;/p&gt;

&lt;p&gt;At Causely, we've built a Causal Reasoning Platform that assures continuous application reliability, and we're excited to introduce a new interactive tour so you can experience Causely for Cloud-Native Applications yourself.&lt;/p&gt;

&lt;p&gt;In this &lt;a href="https://www.causely.io/resources/experience-causely/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=tour"&gt;self-guided tour&lt;/a&gt;, you'll explore the key features and capabilities of our platform, witnessing firsthand how it can transform your DevOps strategy and day-to-day work. From automatically identifying root causes of anomalies to future-proofing your application environment and avoiding unintended consequences of new releases, our Causal Reasoning Platform will help you minimize service disruptions and stay focused on meeting business objectives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.causely.io/resources/experience-causely/?utm_source=dev.to&amp;amp;utm_medium=causely_org&amp;amp;utm_campaign=tour"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6c6orhacbf8w94llleft.png" alt="causal reasoning platform" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take Causely for Cloud-Native Applications for a spin and let us know what you think!&lt;/p&gt;

</description>
      <category>causality</category>
      <category>rootcause</category>
      <category>cloudnative</category>
    </item>
  </channel>
</rss>
