This is the first of #100DaysToOffload, so I figured I’d start off complaining.
I love self-hosting. Not only for the privacy aspect, nor for just the support of (mostly) FOSS projects, but because I just love to tinker. I have a home-built desktop with a modest 32GB of memory that I use to host several dozen projects at a time.
A couple of these projects are chat servers. I have Rocket.Chat, Mattermost, and the now Synapse (Matrix). I mainly use Rocket.Chat, but also tinker with Mattermost as new features come out. I got interested in the idea of federated services when I started playing with Mastodon, so using something like Synapse sounded neat. Plus, it’s something else to tinker with.
I do enjoy it, and while it has some features I like over the other two (such as read notifications using user icons, like Messenger, and thumbnails for uploading video), the biggest headache is joining a public room when there are above a couple hundred people. It just sits, for the longest time, and eventually times out. It chews up RAM and CPU, for something that, at least on the surface, seems simple enough to do.
However, from what I’m understanding, there’s a lot more to it than simply linking to a room. A lot of state events are processed, from what I’m understanding, and having a server with 4GB of memory or more is the bare minimum. I started off running Synapse on a Docker image, noticed the issues trying to join rooms, and even on a dedicated VM with the minimum 4GB attached to it, it’s still crashing and taking forever to attempt to join a room. Chatting with a single user is fine, even on a shared Docker instance with only 1GB of RAM.
So, I don’t know the innards as to what is happening when a client joins a large room. I’m sure it’s a downside to a distributed/federated ecosystem and managing the state of hundreds of disjointed instances, perhaps?
Leave a Reply