4 ms·
You fail to address the core point of the parent: a no-GC language like Rust does not compete in the same space as Go. You either need the low overhead of no-G
by Mawr 5y ago
You fail to address the core point of the parent: a no-GC language like Rust does not compete in the same space as Go.
You either need the low overhead of no-GC or you don't. If you don't, choosing Rust is a mistake.
---
As for your examples, I'm familiar with the Discord rewrite and I looked up the Linkerd2 proxy. Both programs are low-level services that are designed to handle as much load as possible, so yeah they should be written in a non-GC language.
---
> Linkerd2 proxy was written in Rust, despite Linkerd 2 being written in Go.
From [2]:
"The decision to use Rust came down to several factors. First, a service mesh proxy has some pretty stringent requirements: because it’s deployed as a sidecar on a per-pod basis, it has to have as small a memory and CPU footprint as possible. Because most or all of the application’s network traffic flows through the proxy, it needs to have minimal latency overhead, especially worst-case tail latency."
This should obviously be written in a non-GC'd language.
---
> The famous rewrite from Go into Rust done by Discord for their microservices.
> microservice**s**
Nope, just one microservice; at least according to the article ([1]).
From the article:
"In order to get quick atomic counter updates, each Read States server has a Least Recently Used (LRU) cache of Read States. There are millions of Users in each cache. There are tens of millions of Read States in each cache. There are hundreds of thousands of cache updates per second."
So again, the same exact story - stringent latency/speed requirements.
---
[1]: https://blog.discord.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f?gi=bf696da538ed https://blog.discord.com/why-discord-is-switching-from-go-to...
[2]: https://linkerd.io/2020/07/23/under-the-hood-of-linkerds-state-of-the-art-rust-proxy-linkerd2-proxy/ https://linkerd.io/2020/07/23/under-the-hood-of-linkerds-sta...
- pjmlp 5y agoThe languages compete on whatever people decide to use them for. People also use JavaScript, Python and Ruby for use cases that ask for AOT compiled languages Thankfully no one is going to jail for using a language where it doesn't belong.