Rewriting in Rust + Being a Learning Machine with AJ Stuyvenberg
May 6, 2025
auto_awesome
AJ Stuyvenberg, a Staff Engineer at Datadog, discusses the intriguing transition from Go to Rust while rewriting AWS Lambda extensions. He emphasizes the importance of performance and reliability, diving into the complexities of integrating third-party solutions. AJ shares insights on gaining project approval and the benefits of extensive performance optimization in serverless environments. He also offers practical advice for developers navigating the AWS ecosystem and the evolving landscape of database technologies.
The transition from Go to Rust for Datadog's Lambda extension emphasized performance gains and improved memory management for serverless applications.
Understanding AWS service mechanics and optimizing initialization processes are crucial to reducing cold start times for enhanced user experience.
Continual learning and mastery of foundational concepts empower developers to navigate shifts in technology and enhance their coding proficiency.
Deep dives
Challenges of Using Go for Serverless Development
Using Go for serverless architecture presents challenges due to its full-featured runtime. While Go is well-suited for various applications, its features such as garbage collection and goroutines can lead to heavy resource usage, affecting performance in a serverless environment. This concern is heightened during initialization time or cold starts, where the latency directly impacts user experience. As a result, developers often find themselves balancing the advanced capabilities of Go against the simplicity and efficiency required for serverless functions.
Transitioning from Go to Rust in Datadog
The decision to rewrite Datadog's Lambda extension from Go to Rust is driven by the pursuit of performance and memory management. Rust’s memory safety features and lack of necessity for a garbage collector make it a suitable candidate for an ultra-lightweight runtime in a serverless context. The initial performance benchmarks indicated that Go fell short in reducing cold start times to desired levels, leading to the exploration of Rust as a solution. This transition allowed for an optimal blend of speed and safety, essential for maintaining excellent customer experiences while using Lambdas.
Exploring the Rust Ecosystem
The Rust ecosystem offers a mature set of tools but can be challenging due to the need for extensive reading of library code. Transitioning from Go to Rust highlighted differences in design philosophies, where Go is often perceived as user-friendly whereas Rust requires a deeper understanding of ownership and memory management. Although sometimes cumbersome, the ecosystem encourages learning idiomatic practices that contribute to improved coding proficiency. Rust's growing popularity signifies a shift toward more performance-oriented programming, appealing to developers looking for safe and efficient systems.
Lambda Cold Start Optimization Strategies
To address cold start times in AWS Lambda, a deep understanding of the mechanics of AWS services is crucial. Strategies include optimizing initialization processes, using smaller, efficient binaries, and leveraging container images to take advantage of cached layers. By managing memory independently and minimizing cold starts, developers can significantly improve user experience while maintaining high performance. This challenge emphasizes the need for robust engineering practices and continuous benchmarking to meet performance expectations in serverless computing.
Organizational Buy-in for Ambitious Projects
Securing organizational backing for projects like the transition from Go to Rust involves presenting a well-structured vision and proof of concept. Effective communication of the risks and benefits, combined with demonstrable performance improvements, is key to gaining support from stakeholders. The process often requires navigating company culture and aligning project goals with broader organizational objectives. Ultimately, establishing clear metrics of success and demonstrating past failures creates a compelling case for pursuing innovative solutions.
Advice for Navigating a Tech Career
For individuals pursuing a tech career, embracing continuous learning and the willingness to delve deeper into technical nuances is essential. Understanding foundational concepts of networking, HTTP, and underlying system architectures empowers developers across language barriers and application types. Practical experience, such as handling HTTP requests or experimenting with different programming environments, fosters a deeper understanding of tech stacks. This foundational knowledge positions developers to adapt swiftly to emerging technologies and shifts in the industry.
Today's guest is AJ Stuyvenberg, a Staff Engineer at Datadog working on their Serverless observability project. He had a great article recently about how they rewrote their AWS Lambda extension in Rust. It's a really interesting look at a big, hard project, from thinking about when it's a good idea to do a rewrite to talking about their focus on performance and reliability above all else and what he thinks about the Rust ecosystem.
Beyond that, AJ is just a learning machine, so I got his thoughts on all kinds of software development topics, from underrated AWS services and our favorite databases to the AWS Free Tier and the annoyances of a new AWS account.
Finally, AJ dishes out some career advice for curious, ambitious developers.
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.