4 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
New Relic migrated its Lambda Extension from Go to Rust, resulting in a 40% reduction in billed duration and improved memory efficiency. The rewrite also enhanced reliability and introduced a more robust telemetry pipeline.
If you do, here's more
New Relic has completely rewritten its Lambda Extension, transitioning from Go to Rust. This shift wasn't just a language swap; it involved a comprehensive re-architecture aimed at improving the monitoring of AWS Lambda functions. The results are substantial: the billed duration has dropped by around 40%, and memory usage has decreased by about 13%. These improvements translate to lower costs for users and a more reliable service.
The decision to move to Rust stemmed from several challenges with the Go version. Issues included reliability, memory overhead due to Go’s garbage collector, and data loss from failed telemetry sends. Rust’s zero-cost abstractions provide high-level features without runtime slowdowns, making it an appealing choice. Its strict ownership model helps prevent bugs like memory leaks, which is crucial for a service that runs alongside customer code.
The architectural changes are significant. The event loop now uses Tokio’s async runtime for non-blocking I/O, moving away from the synchronous blocking approach in Go. State management has shifted to a layered system with lock-free global state, eliminating bottlenecks. The telemetry pipeline has evolved to include retry mechanisms, significantly reducing data loss. Rust’s memory management allows for predictable usage without the overhead of a garbage collector, further enhancing performance.
Transitioning to Rust posed challenges, including a steeper learning curve and a smaller ecosystem compared to Go. However, the team adapted by utilizing existing Rust libraries and building custom solutions when necessary. The effort has paid off with a more efficient and reliable extension that addresses the needs of users effectively.
Questions about this article
No questions yet.