Coding for Performance: Why We Chose Rust

4 MIN READ
MIN READ

The next major version of the LogDNA agent is right around the corner, and we’re introducing some significant improvements. Most notably, we’ve completely rewritten the agent using Rust instead of Node.js. As we gear up for the release, we wanted to explain why we chose Rust for the LogDNA agent, the benefits that it offers over other languages, and how it can help you log faster and more efficiently as part of a robust telemetry pipeline.

What is Rust?

Rust is a systems programming language that aims to offer both performance and safety. It provides the low-level control of C, but also enforces memory and thread safety. Its applications compile directly into machine code, allowing for highly optimized code and better performance compared to interpreted languages such as JavaScript or Python.

Despite being relatively new, Rust is being adopted at an incredible rate. It’s the most loved language by developers according to the Stack Overflow Developer Survey, and it’s the fifth fastest growing language according to GitHub’s State of the Octoverse.

What Are the Benefits of Rust?

One of Rust’s key strengths is its memory and thread management. While Rust doesn’t have garbage collection like Node.js, Java, Python, and others, the Rust compiler enforces checks for invalid memory references, leaks, and other dangerous or undefined behaviors.

Rust follows the principle of resource allocation is initialization (RAII), where any resources that must be acquired (such as a file or database connection) are bound to the lifetime of their parent object. This prevents a lot of the traps that C developers fall into, such as dangling pointers, null pointers, and accessing uninitialized memory. It also reduces the risk of memory leaks and improves the reliability of log rotation processes.

When multithreading, Rust requires each thread to own (or borrow) the resources that it wants to access. It also prevents resources from going out of scope until a thread is no longer using them. This avoids race conditions caused by multiple threads accessing the same data, but also prevents one thread from deleting a resource that another thread is using.

Rust provides a package management tool called Cargo. This might not seem like a big deal, since package management is common in languages like Node.js, Python, and Java. But considering that neither C or C++ have universal package management tools, having the ability to automatically resolve dependencies in a systems language is powerful. Instead of having a complex build process, we can simply run cargo build to build the agent from scratch.

This makes it easier to plug the agent into a broader telemetry pipeline where reliable compilation and deployment are crucial.

The advantage of Rust being built in this way is the predictable performance at compile time unlike the JIT compilation and interpreter of Node.js. This helps optimize throughput for APM logging scenarios, where capturing application performance data requires efficient, real-time log processing.

Why we chose Rust

The key benefit that Rust provides is performance. Rust programs are compiled directly into machine code similar to languages such as C/C++, Objective-C, Haskell, and Swift. There’s no virtual machine or interpreter sitting between your code and your computer.

In one benchmark comparing REST API performance (using Rocket for Rust and Restify for Node.js), Rust handled 72,000 requests per second compared to Node.js’ 8,000, and used just over 1MB of memory when idle compared to Node.js’ 19MB. In another benchmark comparing web frameworks (nickel for Rust and restana for Node.js), Rust responded to requests nearly 100x faster on average than Node.js.

This level of lightweight, high throughput performance is essential for something like a logging agent. It helps us prevent the agent from exhausting system resources and becoming a bottleneck, no matter how many logs it needs to process. You can feel confident knowing that your logs are being sent to LogDNA without affecting the performance of your applications.

We also see Rust as a more robust foundation for alternatives to tools like logspout, giving us the flexibility to route logs from containers with greater performance and reliability.

Another advantage of moving from Node.js to Rust is the shift to a lower level in the stack and dependency on the kernel. The advantage of interacting with the Linux kernel is that our agent can use inotify to monitor changes in the filesystem, which relieves the CPU utilization of the active polling for changes in log files.

This low-level efficiency plays a significant role in telemetry pipelines, where log volume can spike dramatically and demand consistent log ingestion.

We will share benchmarks and more details about our new agent shortly.

Table of Contents

    Share Article

    RSS Feed

    Next blog post
    You're viewing our latest blog post.
    Previous blog post
    You're viewing our oldest blog post.
    What is Active Telemetry
    Launching an agentic SRE for root cause analysis
    Paving the way for a new era: Mezmo's Active Telemetry
    The Answer to SRE Agent Failures: Context Engineering
    Empowering an MCP server with a telemetry pipeline
    The Debugging Bottleneck: A Manual Log-Sifting Expedition
    The Smartest Member of Your Developer Ecosystem: Introducing the Mezmo MCP Server
    Your New AI Assistant for a Smarter Workflow
    The Observability Problem Isn't Data Volume Anymore—It's Context
    Beyond the Pipeline: Data Isn't Oil, It's Power.
    The Platform Engineer's Playbook: Mastering OpenTelemetry & Compliance with Mezmo and Dynatrace
    From Alert to Answer in Seconds: Accelerating Incident Response in Dynatrace
    Taming Your Dynatrace Bill: How to Cut Observability Costs, Not Visibility
    Architecting for Value: A Playbook for Sustainable Observability
    How to Cut Observability Costs with Synthetic Monitoring and Responsive Pipelines
    Unlock Deeper Insights: Introducing GitLab Event Integration with Mezmo
    Introducing the New Mezmo Product Homepage
    The Inconvenient Truth About AI Ethics in Observability
    Observability's Moneyball Moment: How AI Is Changing the Game (Not Ending It)
    Do you Grok It?
    Top Five Reasons Telemetry Pipelines Should Be on Every Engineer’s Radar
    Is It a Cup or a Pot? Helping You Pinpoint the Problem—and Sleep Through the Night
    Smarter Telemetry Pipelines: The Key to Cutting Datadog Costs and Observability Chaos
    Why Datadog Falls Short for Log Management and What to Do Instead
    Telemetry for Modern Apps: Reducing MTTR with Smarter Signals
    Transforming Observability: Simpler, Smarter, and More Affordable Data Control
    Datadog: The Good, The Bad, The Costly
    Mezmo Recognized with 25 G2 Awards for Spring 2025
    Reducing Telemetry Toil with Rapid Pipelining
    Cut Costs, Not Insights:   A Practical Guide to Telemetry Data Optimization
    Webinar Recap: Telemetry Pipeline 101
    Petabyte Scale, Gigabyte Costs: Mezmo’s Evolution from ElasticSearch to Quickwit
    2024 Recap - Highlights of Mezmo’s product enhancements
    My Favorite Observability and DevOps Articles of 2024
    AWS re:Invent ‘24: Generative AI Observability, Platform Engineering, and 99.9995% Availability
    From Gartner IOCS 2024 Conference: AI, Observability Data, and Telemetry Pipelines
    Our team’s learnings from Kubecon: Use Exemplars, Configuring OTel, and OTTL cookbook
    How Mezmo Uses a Telemetry Pipeline to Handle Metrics, Part II
    Webinar Recap: 2024 DORA Report: Accelerate State of DevOps
    Kubecon ‘24 recap: Patent Trolls, OTel Lessons at Scale, and Principle Platform Abstractions
    Announcing Mezmo Flow: Build a Telemetry Pipeline in 15 minutes
    Key Takeaways from the 2024 DORA Report
    Webinar Recap | Telemetry Data Management: Tales from the Trenches
    What are SLOs/SLIs/SLAs?
    Webinar Recap | Next Gen Log Management: Maximize Log Value with Telemetry Pipelines
    Creating In-Stream Alerts for Telemetry Data
    Creating Re-Usable Components for Telemetry Pipelines
    Optimizing Data for Service Management Objective Monitoring
    More Value From Your Logs: Next Generation Log Management from Mezmo
    A Day in the Life of a Mezmo SRE
    Webinar Recap: Applying a Data Engineering Approach to Telemetry Data
    Dogfooding at Mezmo: How we used telemetry pipeline to reduce data volume
    Unlocking Business Insights with Telemetry Pipelines
    Why Your Telemetry (Observability) Pipelines Need to be Responsive
    How Data Profiling Can Reduce Burnout
    Data Optimization Technique: Route Data to Specialized Processing Chains
    Data Privacy Takeaways from Gartner Security & Risk Summit
    Mastering Telemetry Pipelines: Driving Compliance and Data Optimization
    A Recap of Gartner Security and Risk Summit: GenAI, Augmented Cybersecurity, Burnout
    Why Telemetry Pipelines Should Be A Part Of Your Compliance Strategy
    Pipeline Module: Event to Metric
    Telemetry Data Compliance Module
    OpenTelemetry: The Key To Unified Telemetry Data
    Data optimization technique: convert events to metrics
    What’s New With Mezmo: In-stream Alerting
    How Mezmo Used Telemetry Pipeline to Handle Metrics
    Webinar Recap: Mastering Telemetry Pipelines - A DevOps Lifecycle Approach to Data Management
    Open-source Telemetry Pipelines: An Overview
    SRECon Recap: Product Reliability, Burn Out, and more
    Webinar Recap: How to Manage Telemetry Data with Confidence
    Webinar Recap: Myths and Realities in Telemetry Data Handling
    Using Vector to Build a Telemetry Pipeline Solution
    Managing Telemetry Data Overflow in Kubernetes with Resource Quotas and Limits
    How To Optimize Telemetry Pipelines For Better Observability and Security
    Gartner IOCS Conference Recap: Monitoring and Observing Environments with Telemetry Pipelines
    AWS re:Invent 2023 highlights: Observability at Stripe, Capital One, and McDonald’s
    Webinar Recap: Best Practices for Observability Pipelines
    Introducing Responsive Pipelines from Mezmo
    My First KubeCon - Tales of the K8’s community, DE&I, sustainability, and OTel
    Modernize Telemetry Pipeline Management with Mezmo Pipeline as Code
    How To Profile and Optimize Telemetry Data: A Deep Dive
    Kubernetes Telemetry Data Optimization in Five Steps with Mezmo
    Introducing Mezmo Edge: A Secure Approach To Telemetry Data
    Understand Kubernetes Telemetry Data Immediately With Mezmo’s Welcome Pipeline
    Unearthing Gold: Deriving Metrics from Logs with Mezmo Telemetry Pipeline
    Webinar Recap: The Single Pane of Glass Myth
    Empower Observability Engineers: Enhance Engineering With Mezmo
    Webinar Recap: How to Get More Out of Your Log Data
    Unraveling the Log Data Explosion: New Market Research Shows Trends and Challenges
    Webinar Recap: Unlocking the Full Value of Telemetry Data
    Data-Driven Decision Making: Leveraging Metrics and Logs-to-Metrics Processors
    How To Configure The Mezmo Telemetry Pipeline
    Supercharge Elasticsearch Observability With Telemetry Pipelines
    Enhancing Grafana Observability With Telemetry Pipelines
    Optimizing Your Splunk Experience with Telemetry Pipelines
    Webinar Recap: Unlocking Business Performance with Telemetry Data
    Enhancing Datadog Observability with Telemetry Pipelines
    Transforming Your Data With Telemetry Pipelines
    6 Steps to Implementing a Telemetry Pipeline
    Webinar Recap: Taming Data Complexity at Scale