The incident started with a blog post by AWS a few days ago: “Sustainability with Rust”.
In this article, AWS compares Rust and Go as examples. AWS believes the reason for this is that Go is a garbage collection (GC) language, so when objects are created and released, the garbage collector needs to stop the program every once in a while and run a garbage collection. When the garbage collector is running, the process cannot respond to requests.
To solve this problem, Discord decided to try rewriting the service in Rust. The test results showed a speedup of over 10x with the Rust rewrite, and the slowest tail latency was reduced to about 1% of the original.
The graph below shows the peak CPU and response times during the run, with the Go implementation on the left and the Rust implementation on the right.
Go development team leader Russ Cox (rsc) believes that AWS’s comparison here is seriously misleading about Go. He argues that the AWS article compares the Go version with the Rust version after using new data structures and more memory, and deliberately circles the “ms” and “µs” time scales. rsc says this is either a misunderstanding of Discord’s original post by AWS, or a blatant lie.
Because in Discord’s original article, when they show a comparison of the Go server to a comparable Rust server, the graphical data sources include both the original version and the rewritten The AWS article deliberately misrepresents this.
Also, the Discord data referenced by AWS was using Go version 1.10, but now version 1.18 is coming soon. Over the course of these 8 major iterations, the Go team has improved many features and provided significant improvements to GC-induced outages (which was the problem Discord was facing at the time).
In addition to this, rsc considers the authenticity of a “very interesting study” cited by AWS to be is highly suspect.
rsc said that the AWS article was fair and objective about Rust, but misleading about Go. He believes that Rust and Go are not a zero-sum game, and that Rust is so good that he prefers to focus on the ways in which Go and Rust complement each other and work well together. For example, this case: https://thenewstack.io/rust-vs-go-why-theyre-better-together/