Did... anyone here actually read the original post? Because it's very clear that the performance improvements have nothing to do with Rust, at all.
> This is not because we run code faster. Even our old service could handle requests in the sub-millisecond range.
Oh, huh. So their code isn't faster? Then why is it using 1/3rd the resources, both CPU and RAM?
> The savings come from our new architecture which can share connections across all threads. This means a better connection reuse ratio, which spends less time on TCP and TLS handshakes. Across all customers, Pingora makes only a third as many new connections per second compared to the old service.
(Emphasis mine)
The programming language has nothing to do with it. Their proxy makes 1/3rd the connections, and thus uses 1/3rd the resources. It's a direct correlation. Nginx could be modified to see the same exact win, but it'd be nontrivial, which is exactly why CloudFlare says they didn't do it.
This isn't 'Oh wow, Rust is so much faster!', it's 'Oh wow, doing less work is faster!'
Edit:
Actually, they do mention that rewriting into Rust [was one factor that] improved performance - but not from C, from Lua. That's wildly different.
> This is not because we run code faster. Even our old service could handle requests in the sub-millisecond range.
Oh, huh. So their code isn't faster? Then why is it using 1/3rd the resources, both CPU and RAM?
> The savings come from our new architecture which can share connections across all threads. This means a better connection reuse ratio, which spends less time on TCP and TLS handshakes. Across all customers, Pingora makes only a third as many new connections per second compared to the old service.
(Emphasis mine)
The programming language has nothing to do with it. Their proxy makes 1/3rd the connections, and thus uses 1/3rd the resources. It's a direct correlation. Nginx could be modified to see the same exact win, but it'd be nontrivial, which is exactly why CloudFlare says they didn't do it.
This isn't 'Oh wow, Rust is so much faster!', it's 'Oh wow, doing less work is faster!'
Edit:
Actually, they do mention that rewriting into Rust [was one factor that] improved performance - but not from C, from Lua. That's wildly different.
Comment