Rust in Production: Qovery
Tags: rust
Published: 2021-08-10 19:28:00

---
title: Rust in Production: Qovery
published: true
date: 2021-08-10 00:00:00 UTC
tags: rust
canonical_url: https://serokell.io/blog/rust-in-production-qovery
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3i2996ku0smufxt3n83r.jpg
---

In this article of our [Rust in Production](https://serokell.io/blog/rust-in-production) series, I interview Benjamin Chastanier, a senior software engineer at Qovery.

We talk about Qovery, the pros and cons of Rust, and what developers should keep in mind when working on Rust projects.

## Interview with Benjamin Chastanier

### Could you tell us more about Qovery and your role there?

Cloud providers came on the scene in the early 2000s to allow anyone to start a tech company and manage infrastructure. Over the years, these providers have become increasingly complex and expensive to manage. For example, AWS, which started with three services, now has over 200 each with its own specificity. As a result, in growing tech companies, developers not only have to manage their tech development but also these complex infrastructures that are wasting time, energy, and resources.

Qovery aims to solve this pain allowing users to focus on their products. We are building the next generation of application deployment and management. Something as simple as your grandma could use!!!

I’m working as Senior Software Backend Engineer at Qovery, mainly focusing on extending the [Qovery engine](https://github.com/Qovery/engine), which is an open-source abstraction layer library on top of cloud providers.

![card](https://serokell.io/files/06/068hwt3e.card_(2).jpg)

### Where do you use Rust in your stack? How big of a part of the Qovery codebase is written in Rust?

We use Rust in a wide variety of places from tooling to [core engine](https://github.com/Qovery/engine) (which is 100% written in Rust) in charge of most of Qovery special sauce.

Not all the stack is written in Rust, we just try to fit it where its usage would make sense. For example, we are about to start a new low-level log message proxy, and Rust sounds like the perfect tool for it.

As of today, [Qovery CLI](https://github.com/Qovery/qovery-cli) (CLI used by devs to interact with Qovery) and [Pleco](https://github.com/Qovery/pleco) (a tool allowing us to clean old cloud resources) are written in Go, and Qovery backend is mostly written with Kotlin.

### How did you decide to choose Rust? Are there any specific requirements that made you choose it?

In the beginning, the Qovery product was based on a Python stack which has grown incredibly fast, supporting the need for new product features. Codebase started to be hard to properly maintain and test due to its empirical design. It was hard to continue to extend it. At this point, a rewrite was on the table, and Rust looked very appealing for a lot of reasons.

Here are the main ones:

- Rust is a strongly typed language, allowing a lot of checks at compile time, meaning: no more runtime errors.
- Rust is focused on security and safety without impacting speed and performance, even if products are not meant for performance.
- Low memory footprint. This is a great advantage for Qovery since our solution is deployed on the customer infrastructure. Reducing our infrastructure needs is one of our main goals.
- Safe by design.
- Amazing toolchain. Cargo, compiler, fmt, clippy, just to name a few.
- Error handling. Rust strongly enforces to acknowledge the eventuality of errors happening along the way at compile time.

### Are there any Rust libraries or frameworks that you found useful and would like to feature?

- [Meilisearch](https://github.com/meilisearch/MeiliSearch): Algolia and Elasticsearch search engine alternative.
- [Sonic](https://github.com/valeriansaliou/sonic): Lightweight Elasticsearch alternative.
- [Sled](https://github.com/spacejam/sled): Storage engine written in Rust - alternative to RocksDB.
- [IsomorphicDB](https://github.com/alex-dukhno/isomorphicdb): PostgreSQL clone - it is a good experimental project written in Rust.
- [Raft-rs](https://github.com/tikv/raft-rs): Raft consensus protocol implemented in Rust by PingCap.
- [Tracing](https://github.com/tokio-rs/tracing): Instrument Rust programs to collect structured, event-based diagnostic information.

### Did Rust help you accomplish something that would be hard to accomplish with any other programming language?

As explained earlier, one of Qovery’s goals is to optimize its customers cloud usage by reducing costs by allocating and scaling their infrastructure based on their needs.

Because Qovery is deployed on customers’ infrastructure, it’s very important to keep Qovery’s footprint as low as possible. Rust does an amazing job at this, allowing it to run on a very minimal setup (128 Mo RAM and >1 vCPU).

It wouldn’t have been as easy to achieve this in such a short period of time with C or C++, which allow to do so but don’t expose such a high-level API, or with Go, Python, or other managed language that might require more resources.

Another big advantage is the Rust type system prevents us from having runtime issues which would be very annoying while running on our customers’ cloud infrastructure because it can be tricky to debug. The Rust compiler guarantees stability and does a great job at avoiding runtime failures.

### Are there any places where Rust has fallen short (ecosystem support, productivity, etc.)?

I am thinking about two as of today:

- The ecosystem is still young, and there are obviously fewer libraries as of today than in other ecosystems such as Go or Python, especially on the infrastructure part of things. Some libraries are there but haven’t reached version 1 yet and might be unstable in the sense their API might have to change before reaching v1.
- Compilation time might be a bit long. This is not really inconvenient because the compiler is doing a lot of leg work for you and prevents 95% of bugs from happening in production, but long compiles times require us to be creative with our CI/CD pipelines not to slow down the shipping time too much. For example, we introduced a [build cache](https://github.com/mozilla/sccache), which reduced the build time by ~5 times.

### Which companies or projects should check out Qovery for their own use?

Basically, Qovery is perfect for any online company that needs to stay focused on its business. In 18 months, we have 6500+ developers from 120+ countries who are using Qovery. The promise is simple: get the Heroku experience on top of your AWS account.

### What are the future plans of Qovery?

Future features are listed in [our public roadmap](https://roadmap.qovery.com/c/50-public-launch-of-qovery-v2-migrate-all-community-users-to-qovery-v2). On the other side, Qovery stands to build the future of the Cloud. Stay tuned – our initiative called “meta.cloud” will be announced within the coming weeks.

### Any tips you would suggest for those wanting to launch their own open-source Rust project (can be both technical and non-technical)?

- Rust is an amazing language.
- Learn and understand the main concepts (ownership, borrowing, lifetime, etc.).
- Do not expect to master it before 3 to 6 months – even if you are an experienced developer.
- Share your enthusiasm and what you have learned with the community – it will help to promote this great language.
- Build a product/project you enjoy working on.
- Enjoy Rust. :)

* * *

I’d like to thank Benjamin for the interview! If you want to learn more about Qovery, go straight to their [website](https://www.qovery.com/).

For more info on how Rust is used in industry, be sure to check out our [series of interviews](https://serokell.io/blog/rust-in-production), where we talk with companies like [1Password](https://serokell.io/blog/rust-in-production-1password) and [MeiliSearch](https://serokell.io/blog/rust-in-production-meilisearch).

And if you would like to be notified about new Rust articles that we publish, we’re on [Twitter](https://twitter.com/serokell), [Medium](https://serokell.medium.com/), and [Dev](https://dev.to/serokell).

See you around! 👋