Home / Companies / New Relic / Blog / Post Details
Content Deep Dive

A New Era for New Relic’s Lambda Extension: From Go to Rust

Blog post from New Relic

Post Details
Company
Date Published
Author
Chodavarapu Naga Viswanadha Avinash, Software Engineer
Word Count
1,144
Language
English
Hacker News Points
-
Summary

The New Relic Lambda Extension underwent a major transformation by migrating its entire codebase from Go to Rust, resulting in a fundamental re-architecture of AWS Lambda function monitoring. This change led to significant improvements, including a 40% reduction in billed duration and a 13% decrease in memory usage, enhancing both cost-effectiveness and performance. The decision to switch to Rust was motivated by its "Zero-Cost Abstractions," lack of a garbage collector, and strong memory safety guarantees, which collectively improved reliability and minimized data loss. The transition involved redesigning architectural components such as the event loop, state management, and telemetry pipeline to leverage Rust's asynchronous capabilities and concurrent structures, eliminating bottlenecks and enhancing the extension's robustness. While the migration posed challenges due to Rust's steep learning curve and smaller ecosystem, the effort was justified by the substantial gains in efficiency and reliability, making Rust a compelling choice for infrastructure where performance and safety are critical.