Get the latest tech news
Discord Reduced WebSocket Traffic by 40%
How we rolled out zstandard and other improvements across our gateway cluster to reduce the amount of bandwidth that’s used by our clients.
However, doing this adds additional complexity as both the compressor (in this case, a gateway node) and the decompressor (a Discord client) need to have the same copy of the dictionary to communicate with each other successfully. As shown in the table above, the compression gains were minimal for READY, so we looked at the results for more dispatch types hoping dictionaries would give more of an edge for smaller payloads. Since zstandard ships as a C library, it was simply a matter of finding bindings in the target language —Java for Android, Objective C for iOS, and Rust for Desktop — and hooking them into each client.
Or read this on Hacker News