Meet the Rustaceans : Brendon Daugherty

This article was written in collaboration with Brendon Daugherty, a production engineer at Facebook.

For today’s interview, we have Brendon Daugherty, a production engineer on the IaaS (Infrastructure as a Service) resource team at Facebook. The IaaS team is working on developing tools and systems to better manage Facebook’s infrastructure on a large scale. While working on this team, Brendon used Rust as one of the main development languages. He mainly works on distributed systems, services and cron jobs. Let’s hear from him about his experience with Rust and learn more about his work.

In what capacity did you use Rust?

Our team mainly writes Rust. Almost all of the code I wrote on Facebook was in Rust, including lots of command line tools, some distributed systems, and a few cron jobs.

Why did your team on Facebook choose to use Rust over other languages?

My team mainly switched from Python to Rust for a couple of important reasons:

  • Performance, especially with CLI tools.
  • Compile time guarantees. Rustc is amazing!
  • Good async await support
  • Storage security

What projects have you been working on on Facebook that use Rust?

Almost every project I’ve worked on on Facebook has been in Rust:

  • My team owns two large distributed systems that manage the server provisioning process and the accounting systems we use to manage the fleet, both of which are entirely written in Rust.
  • We have a few smaller cron jobs written entirely in Rust using our custom cron framework.
  • We have a Python Rust service that helps us acquire and deploy hardware for various experiments.
  • We recently switched our service to help determine how much buffer we should allocate with different machines, from a Python Rust service to a service written entirely in Rust.

What do you think of Rust’s growth path on Facebook?

I feel pretty good about it. More and more services are being written in Rust, and more tools are adding Rust support. We’re fortunate to have a thriving community of Rust developers here on Facebook and a strong Rust Foundation team who are helpful with both code reviews and learning about Rust.

What is the value of Facebook for Rust?

I think Facebook does a great job when it comes to interoperability with C ++. CXX is amazing and made it a lot easier for me to use Rust as it integrates with existing C ++ libraries both inside and outside of Facebook.

How do you think Rust will grow as a language in 2021?

I think Rust is growing the fastest in its community. With major improvements in lifespan and compiler, Rust is becoming more and more accessible. Because of this, more and more people are seeing how much easier programming can be when you have Rustc as a co-pilot. That way, people build better tools and the environment just keeps getting better.

Some people who have used Rust really like it. Why do you think that is the case and what is your favorite feature of Rust?

My favorite feature of Rust is Rustc. When I started here on Facebook, I came to Rust and had written a lot of C ++. Originally I was worried that I would have to learn a completely new language, but what I didn’t realize was that despite 4 years of C ++ in school, I was actually more willing to write Rust than C ++. To write C ++ you have to be extremely careful. I wasn’t fully prepared to check my team’s code to look for hanging clues and undefined behavior.

Now that I’ve been using Rustc, not only have I written a lot of code that I know is safe, but I’ve also become a better programmer. The back and forth with Rustc has taught me to pay attention to how the data moves in my program, and when I am reviewing or writing Python code I am much more careful because I am not at the wheel of Rustc.

Where can people learn more about Rust and how can they start contributing to it?

The Book-Rust programming language is definitely the beginning. Read it through, then start your own project. There is also a pretty great Rust programming language community on Discord that I would recommend joining, where you can ask questions and even find a good project to contribute to.

We thank Brendon for taking the time to do this interview. It was very interesting to see how Rust is used as the primary language for building tools and systems and how we learn from all the things we build here and contribute to the Rust community. We hope you found this interview helpful and it gave you some insight into how and where Rust is used on Facebook.

Check out our previous blogs from the Meet the Rustaceans series:
Meet the Rustaceans: Chris Konstad
Meet the Rustaceans: Pedro Rittner
Meet the Rustaceans: Neil Mitchell
Meet the Rustaceans: Daniel Xu
Meet the Rustaceen: Eric Kuecks
Meet the Rustaceans: Gus Wynn

About the Meet the Rustaceans series

Rust has been ranked the “Most Popular” language consistently for the past 5 years and we at Facebook believe Rust is a standout language that shines and is widely used on critical issues like storage security, performance and reliability by projects here. We have joined the Rust Foundation to help improve and grow Rust, which not only strengthens our commitment to the Rust language, but also to the sustainable development of open source technologies and developer communities around the world.

This blog is part of our Meet the Rustaceans series where we invite engineers and developers who use Rust regularly to share their experiences and tell us about the amazing products they are building with Rust here on Facebook. Keep an eye out for more interview blogs where we meet many more engineers and hear their thoughts on the subject.

To learn more about Facebook Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.

Interested in working in the field of production technology on Facebook? Here you will find our job advertisements on our career page Production Technology.

Comments are closed.