![]() ![]() Why Go did not meet our performance targets After investigating, we determined the spikes were due to core Go features: its memory model and garbage collector (GC). It was fast most of the time, but every few minutes we saw large latency spikes that were bad for user experience. With the Go implementation, the Read States service was not supporting its product requirements. We want to make sure Discord feels super snappy all the time, so we need to make sure Read States is quick. In short, Read States is in the hot path. Read States is accessed every time you connect to Discord, every time a message is sent and every time a message is read. Its sole purpose is to keep track of which channels and messages you have read. The service we switched from Go to Rust is the “Read States” service. The Read States serviceĭiscord is a product focused company, so we’ll start with some product context. This post explains why it made sense for us to reimplement the service, how it was done, and the resulting performance improvements. ![]() Most recently, we drastically improved the performance of a service by switching its implementation from Go to Rust. For example, we use it on the client side for our video encoding pipeline for Go Live and on the server side for Elixir NIFs. At Discord, we’ve seen success with Rust on the client side and server side. Rust is becoming a first class language in a variety of domains. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |