This is a great article. Discord has a lot of scalability problems, and in this article, they focus on one problem that looks trivial, but it’s not at this scale: updating the “Member List”, which is the list of users that are currently on a specific server (or “guilds” as they call it).
For 99.99% of the companies in the world, updating an ordered list or a set is not a problem, but it is for Discord. In this article, they are trying to find the most efficient way to store this list, and they make a lot of tests and shows here all the numbers. In the end, the best solution they found is to plug a small Rust library into the BEAM virtual machine and use that via Elixir, and the worst-case scenario they have is 4𝜇s.
If you are interested in trying to optimize the performance of a simple problem as much as possible, this article is for you.