News for hackers. Stuff that matters.
Re:Why is IRC distributed across multiple servers? by mvanbaak on Sunday September 12, 2021 @08:52AM (#28500685)
> via round robin DNS (meaning that when people resolve the DNS it gives them a random server from the set of 20 to connect to)

Most of the times, it's not simple round-robin, but also geo-based. This means clients will get ip addresses of the servers closest to them.

Re:Why is IRC distributed across multiple servers? by magila on Sunday September 12, 2021 @10:42AM (#28501582)
My experience with Freenode/Libra Chat is that they either don't implement geo DNS or don't do a very good job of it. I'm on the US west coast and lookups to irc.libera.chat often return servers in Europe.

Edit: Double checking Libra Chat's website I see that they have added regional hostnames so I guess that's their solution.

Re:Why is IRC distributed across multiple servers? by pvtmert on Sunday September 12, 2021 @11:24AM (#28502008)
if they're using aws route53, your isp needs to support edns.

otherwise, your netblock might have been falsely advertised in the dns provider's geoip database. (eg. maxmind)

Re:Why is IRC distributed across multiple servers? by pushrax on Sunday September 12, 2021 @11:38AM (#28502126)
They're using Cloudflare. When I resolve them from the east coast, I got a San Francisco server once and a server in Budapest once. They have a server in Toronto, Ashburn, Montreal, and other places that are closer.

I know geodns works here since I use it for some of my own deployments.

Re:Why is IRC distributed across multiple servers? by melony on Sunday September 12, 2021 @11:35AM (#28502101)
Does IRC predates distributed state machines? Why can't the servers sync up the chat via Paxos or Raft?
Re:Why is IRC distributed across multiple servers? by X6S1x6Okd1st on Sunday September 12, 2021 @11:53AM (#28502248)
paxos was first created 1989, but not popularized for a long while after: https://en.m.wikipedia.org/wiki/Paxos_(computer_science)

irc 1988: https://en.m.wikipedia.org/wiki/Internet_Relay_Chat

Earliest reference for raft I can find is 2013.

Re:Why is IRC distributed across multiple servers? by giantrobot on Sunday September 12, 2021 @12:41PM (#28502646)
Distributing state wasn't the goal on IRC, only relaying messages. If you miss a message you miss a message. You can use client-side tools (bots, bouncers, etc) to record state but the protocol itself doesn't care.
Re:Why is IRC distributed across multiple servers? by jandrese on Sunday September 12, 2021 @09:57PM (#28507063)
IRC is sized to run on 80s hardware. Storing messages wasn’t possible because few nodes would have enough memory to store more than a handful of messages. The links were so slow that spitting over a backlog on reconnect could stall the connection for a non-trivial amount of time.
Re:Why is IRC distributed across multiple servers? by duskwuff on Sunday September 12, 2021 @03:13PM (#28503944)
Implementing Paxos would mean that stateful operations (like connecting to the server, joining a channel, or changing modes) become impossible on a server, or a group of servers, that have lost quorum.
Re:Why is IRC distributed across multiple servers? by manquer on Sunday September 12, 2021 @12:10PM (#28502380)
Chat is not that complex as other distributed applications you probably don't need Raft.Both Paxos and Raft are very complex algorithms to implement.

A CRDT based append only implementation is probably more than enough?. Data is never modified only added/removed in typical chat workflows.

Reading discourd engineering blog over the years it looks like scaling the pub/sub for the consumers in large channels is lot harder than DB/store itself being distributed.

Re:Why is IRC distributed across multiple servers? by sterlind on Sunday September 12, 2021 @11:48AM (#28502207)
hard to do Paxos over large geographical distances efficiently, but... it's IRC, so..

I just assume it was from an earlier internet where distributed systems weren't as well understood. I don't think it necessarily predates Paxos but it definitely predates Paxos being a household name.