Live data from Hacker News

Modern messaging: Running your own XMPP server

codedge.de

11–20 of 156 posts

Re: Modern messaging: Running your own XMPP server

#11
post #9

Any idea what kind of server we’d need to handle 40M users if it’s just text chat (no files or audio)?

If you’re running a single machine, you’ll be limited by the number of available ports. It’s a TCP limitation and nothing to do with XMPP. You’d need a cluster of XMPP servers to handle 40M users. Even for just text. Port limits are port limits.

Re: Modern messaging: Running your own XMPP server

#12
post #8
post #4

the only problem, as usual, is the network effect

what about - single point of failure of rooms (server creating the chat room) - media access via 3rd party servers - gossiping encrypted message access across multiple devices - encrypted audio-visual (group) communication - good clients for iOS - reliable server-side storage of messages (of all(!) chats) - realistic verification concept for e2ee with multiple devices

Not my project, but I was hoping to see more stuff like https://prose.org/

As others have pointed out, for iOS Monal is good.

Re: Modern messaging: Running your own XMPP server

#13
post #4

the only problem, as usual, is the network effect

Maybe for friends and family? But then, if their phone might be compromised by the state... And telling friends and family they need to setup a Jabber connection to talk you will make you "That guy/girl who...". And if the idea spreads, then talking to n people requires n accounts on n servers. At least Pidgin (last time I used it, which was last decade) supports such a configuration. I wonder if the mobile apps can…

> And if the idea spreads, then talking to n people requires n accounts on n servers.

No, it doesn't.

XMPP is like E-Mail and Matrix a protocol which supports federation, i.e. a protocol which specifies how many service providers can cooperate, specifically forward messages to other service providers to reach their users.

Re: Modern messaging: Running your own XMPP server

#14
Last time I tried this I couldn’t even find an iOS client that supported reactions. Hate on the complexity of Matrix all you like, but at least when you ask your family to use it, they get a modern experience and don’t feel like they’re giving up everything vs every other messenger they are used to.

Re: Modern messaging: Running your own XMPP server

#15
post #9

Any idea what kind of server we’d need to handle 40M users if it’s just text chat (no files or audio)?

If you’re running a single machine, you’ll be limited by the number of available ports. It’s a TCP limitation and nothing to do with XMPP. You’d need a cluster of XMPP servers to handle 40M users. Even for just text. Port limits are port limits.

40M users don’t all simultaneously send messages, or does XMPP need to sustain an open connection to each user?

Re: Modern messaging: Running your own XMPP server

#16
post #9

Any idea what kind of server we’d need to handle 40M users if it’s just text chat (no files or audio)?

If you’re running a single machine, you’ll be limited by the number of available ports. It’s a TCP limitation and nothing to do with XMPP. You’d need a cluster of XMPP servers to handle 40M users. Even for just text. Port limits are port limits.

You're thinking of outbound port limits. Inbound connections all come in on the same port and there's no port-related limits there.

The real limits are going to be on hardware. If we want 40M concurrent connections, the server will need a few hundred to a few thousand gigabytes of memory.

Re: Modern messaging: Running your own XMPP server

#17
One potential issue with XMPP is the default port is commonly blocked on public wifi.

There is an nginx-xmpp to proxy it, but it is archived. https://github.com/robn/nginx-xmpp

For that reason http based protocol just seems much easier on the network or something that can be easily reverse proxied without extensions will be easier to self-host and have wilder internet connection accessibility.

Re: Modern messaging: Running your own XMPP server

#18
post #9

Any idea what kind of server we’d need to handle 40M users if it’s just text chat (no files or audio)?

Here's a blog post on scalability from the front page (well, sort of, see last paragraph): https://www.process-one.net/blog/ejabberd-massive-scalabilit... This includes not just textual claims about scalability but a lot of hooks you can use to followup on, like a reference to the Tsung benchmarking tool you can use. If you're asking about this for serious reasons, at this scale you're obviously running your own tests anyhow. You may also want to speak directly to Process One about this because it sounds like you're at a scale where you should probably be looking at paid support anyhow.

I'm not necessarily endorsing this, just giving it to you as some first stabs at answers and some ways to follow up.

If there's anyone reading this from the ejabberd project, note that the link to this on your front page under "Massively Scalable" is completely broken; that links to "blog.process-one.net" but that domain is completely dead, so it doesn't redirect to the link I gave above. (It's also part of why I posted this; my post here is not a "just read these docs" because I had to do non-trivial work to find them.) I had to pull that out of archive.org. Should probably check for any other links to that domain too.

Re: Modern messaging: Running your own XMPP server

#19
post #4

the only problem, as usual, is the network effect

Maybe for friends and family? But then, if their phone might be compromised by the state... And telling friends and family they need to setup a Jabber connection to talk you will make you "That guy/girl who...". And if the idea spreads, then talking to n people requires n accounts on n servers. At least Pidgin (last time I used it, which was last decade) supports such a configuration. I wonder if the mobile apps can…

[deleted]

Re: Modern messaging: Running your own XMPP server

#20
post #14

Last time I tried this I couldn’t even find an iOS client that supported reactions. Hate on the complexity of Matrix all you like, but at least when you ask your family to use it, they get a modern experience and don’t feel like they’re giving up everything vs every other messenger they are used to.

I recently tried to move people over, and the iOS situation is bleak. It seems like notifications don't work at all in any app, which is a big problem for chat. Also, one of them (I think Siskin?) doesn't display sender name/avatar in group chats, so you can't tell who sent what.

There's also some weird behavior with how E2EE works, which is causing me problems in group chats. Initially it worked, but now people are unable to read some messages with errors like "this message was not encrypted for this device"

FWIW, everything works great on Android with the Conversations app, and also I admit I haven't really RTFM'd too much so it may be my fault as a lazy admin.

Edit: this is with ejabberd btw

Post reply on HN