4 ms·
Discord abandoned Go due to GC overhead. https://blog.discord.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f https://blog.discord.com/why-discord-is
by networkimprov 6y ago
Discord abandoned Go due to GC overhead.
https://blog.discord.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f https://blog.discord.com/why-discord-is-switching-from-go-to...
- naikrovek 6y agoThis is a puzzling decision on Discord's part, because they found the single line of code causing their problem and they didn't think to change that line of code for their own needs. Go distributions include the source for Go itself, so building your own Go binary with your own changes incorporated is dead easy. And, the change they needed is a single-line change, which means it's easy to bring that change forward as new versions of Go are released. Discord: haha, no, that's silly! let's spend 100,000x more effort and rewrite it all in another language! Now, before those of you who learned to argue on the internet extrapolate what I wrote and imagine that I wrote words I didn't write: I'm not saying that Go should never be abandoned for another language. I'm saying that this particular example of this particular choice puzzles me, because of the reasons stated, and ONLY the reasons stated.
- dilyevsky 6y agoNot to mention they could’ve probably just updated their old go runtime...
- aw1621107 6y agoIIRC none of the available Go releases at the time the decision to switch to Rust was made (<=1.10, I think?) addressed their particular issue, and by the time a Go release did fix their issue (1.12?) they were pretty far along with their rewrite. Not entirely sure that I have the Go versions right, but that's what I remembered off the top of my head.
- aw1621107 6y agoJust found a comment by a Discord engineer that says that they did try upgrading their Go runtime (presumably when the decision to rewrite was made) [0]: > Another Discord engineer chiming in here. I worked on trying to fix these spikes on the Go service for a couple weeks. We did indeed try moving up the latest Go at the time (1.10) but this had no effect. [0]: https://old.reddit.com/r/programming/comments/eyuebc/why_discord_is_switching_from_go_to_rust/fgk56y4/ https://old.reddit.com/r/programming/comments/eyuebc/why_dis...
- Konohamaru 6y agoThere's a Serbo-Croatian proverb: "what you don't have in head you have in feet." That is, what you can't do by thinking a little bit means you must do by expending pointless effort instead.
- deleted 6y ago[deleted]
- geodel 6y agoBesides all you said, Discord client is electron based bloated software. So it just seems a case when some engineers itching to write Rust and decided to make virtue out of it.
- Spivak 6y agoBut they’re specifically talking about a server component here. Using Electron on the client doesn’t magically make their need for a high performance backend disappear. They’re still having to make all those clients work and deliver voice chat to millions of simultaneous users.
- geodel 6y agoYes of course they are. Further I understand the "strategic decisions", "markets have spoken" , "faster feature due to single codebase" justifications to Electron usage. To me it just feels like saying we care about our servers meanwhile users can eat crap.
- kjksf 6y agoThat's not what the article is saying. It describes a rewrite of a single service from Go to Rust. Reading between the lines, a rather simple piece of code. At no point it implies that Discord rewrote all their Go code in Rust and completely abandoned Go.
- hu3 6y agoTop-voted comment on that post raises some red flags. > Any reason you’re using 3-year-old Go 1.9.2 but you’re okay using Rust nightly?
- aw1621107 6y agoA Reddit comment by a Discord engineer addresses the old Go part [0]: > Another Discord engineer chiming in here. I worked on trying to fix these spikes on the Go service for a couple weeks. We did indeed try moving up the latest Go at the time (1.10) but this had no effect. [0]: https://old.reddit.com/r/programming/comments/eyuebc/why_discord_is_switching_from_go_to_rust/fgk56y4/ https://old.reddit.com/r/programming/comments/eyuebc/why_dis...