MENU

Fun & Interesting

Embracing Rust at fly.io: How Rust powers our networking layer - Senyo Simpson

Rust Nation UK 3,480 2 years ago
Video Not Working? Fix It Now

At fly.io, we run apps close to your users by taking containers and upgrading them to full-fledged virtual machines running on our hardware worldwide in 26 cities and counting. When requests come into our platform, we route them to the nearest instance of your app via our global Anycast network. This is driven by `fly-proxy`, our internal Rust-based proxy built on top of Tokio, Hyper and Tower. `fly-proxy` is an exciting piece of our stack. It has to build a global picture of all instances running on our platform and route requests (including raw TCP and WebSockets) to the nearest instance. It does other things, too: load balancing across our global network, TLS termination, rate limiting, and metrics tracking! It even handles the lifecycle of some eBPF we run (which I may or may not talk about). As you’ve already realised, I’ll be talking about `fly-proxy`, how it works and Rust's role in building it.

Comment