TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why is IRC distributed across multiple servers?

134 点作者 rain1超过 3 年前

16 条评论

H8crilA超过 3 年前
Just remember that &quot;netsplits&quot; exist in every distributed system, be it a chat app or a database. It&#x27;s just the CAP theorem. IRC has chosen to sacrifice C (consistency).<p>The only thing that changed in the modern times is that the P (partitions) are extremely rare in modern high octane cloud infrastructures. Also, modern solutions often decide to sacrifice A (availability), by returning an error saying &quot;we&#x27;re aware of the problem and we&#x27;re working on a solution&quot;. This is what happened quite recently when Google authentication went out and half of the internet went dark, while under the hood they had a simple out-of-quota situation on one of the replicas of their core authentication systems. The system was programmed to sacrifice A (availability) and reject all authentication requests.
评论 #28504467 未加载
评论 #28503287 未加载
jchw超过 3 年前
Well, from my historical reading of it, initially, IRC was a federated network of servers that were essentially one network, the way email is one network: there was no shared administration or anything. Anyone could run a server and jump into the network. Due to abuse, servers began restricting who they peered with, and it fractured into multiple networks.<p>So really, I suspect it was designed to be distributed and federated, and it just became what it is by accident.
评论 #28503129 未加载
评论 #28503172 未加载
评论 #28504125 未加载
Ologn超过 3 年前
&gt; One of the problems of having multiple servers is that netsplits can occur.<p>In the early&#x2F;mid 1990s, the IRC servers in Australia would split from the IRC servers in the US all of the time (sometimes Europe would break from the US as well). The Internet connection between the US and Australia was slower and flakier back then. It made lots of sense for Australians to be on Australian IRC servers and Americans to be on US IRC servers, and to all be talking together when the link was working (the majority of the time) and to not be when the link broke (fairly regularly). The CAP theorem says something has to go in those cases, and the thing that went was consistency between US and Australian (or European) messages sent to a channel - the messages from the other side of the split would be dropped during the split.<p>I don&#x27;t remember many technical netsplits on Freenode or Libera in recent years, so it is less of a thing now. IRC servers were always federated, so there was the original split of Anet and EFnet, and the Undernet split, then the EFnet&#x2F;IRCnet split which revolved around those US&#x2F;Europe&#x2F;Australia issues. More recently there was the Freenode&#x2F;Libera split.<p>IRC&#x27;s model always worked for me.
throwaway20371超过 3 年前
Why are Linux distributions hosted on multiple mirror servers that they don&#x27;t own?<p>1) money 2) availability 3) trust 4) security<p>1) If you don&#x27;t have a lot of money, you take the servers you can get. Donated mirrors means you don&#x27;t have to pay the bandwidth or hosting bills.<p>2) If you have multiple servers, it&#x27;s less likely that one server going down will tank your project. When GitHub, AWS, or even Level3 has an outage, Linux distros keep on chugging like nothing happened. Traditional server maintenance is also easier when everyone can just switch to a different server.<p>3) Maintainers can use their PGP keys to create signed packages and downloads. Their public keys are distributed on mirrors, as well as embedded in the downloads they&#x27;ve signed. Once downloaded by users, the distribution can verify its own integrity. But how does the user know they started with the real maintainers&#x27; public key? The public key is distributed on a hundred geographically-distributed servers all owned by different people; the user can check them all. So other than compromising a maintainer&#x27;s key, it&#x27;s logistically impossible to compromise end-user security. (this one is more Linux-specific than IRC-specific)<p>4) If you only have one server &amp; it gets compromised, it can be hard to tell. By comparing its operating state to the other servers, you can sometimes more quickly identify the compromise. And if you do find a compromise, you can remove the compromised server quickly, close the hole on the other servers, and start regenerating keys. It&#x27;s an eventuality every large project should be prepared for, and IRC servers do get compromised. Linux mirrors don&#x27;t matter in this regard, but the build servers etc do matter.<p>IRC comes from the same time and place, and has some (but not all) of the same considerations.
mvanbaak超过 3 年前
&gt; 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)<p>Most of the times, it&#x27;s not simple round-robin, but also geo-based. This means clients will get ip addresses of the servers closest to them.
评论 #28501582 未加载
评论 #28502101 未加载
LinuxBender超过 3 年前
I can somewhat answer this. Apologies, this became a bit long winded and I have barely touched on several historical, technical and logistical reasons.<p>Part of the answer is historical and part of this <i>was</i> technical. IRC has been around for a very long time. As such, the earlier versions of the servers and daemons could not accept tens of thousands of client connections <i>ePoll vs Select</i>. The connections between servers are multiplexed and not directly related to the number of people connected to the server. There was also a matter of latency. Servers in a region would keep the messages local to that region, as only people in the same channel get the messages and it was less common to have people in the same channel all over the world. This also changed with time. If there was a split, you lost other regions. This was not always the case, so of course I am over-generalizing since there were many different IRC networks designed by many different people. Being long running services, I had seen a great deal of hesitation to re-architect anything on the fly on at least some of the networks, even after ePoll and modern hardware made it possible to have tens of thousands of people on one server. Some of the smaller IRC networks indeed consolidated into fewer or a single server.<p>Another facet is logistics and ownership. Many of the bigger networks are comprised of servers owned and managed by different people and organizations. The servers are linked as a matter of trust. That trust can be revoked. Most of the early IRC networks were run by people doing this in their free time with their own money and&#x2F;or limited resources. In some other cases some organizations prefer to have their own servers so that their own people indeed to not suffer splits for their local communication. There are a myriad of other use-cases and reasons why some organizations had their own servers. Sometimes there was a need to give LocalOps special permissions that would not be permitted network-wide. Despite the technical capability to have less servers, some organizations are not going to give up their local nodes.<p>One issue not mentioned is permission losses on splits. The issue with splits and permission changes has more to do with the way services are integrated into IRC, or more specifically, aren&#x27;t. Services are treated like bots with higher privilege and most if not all of them were not written to be multi-master. Rather than dealing with moving services around or pushing for read-only daemons, they just lived with the possibility that there would be splits and they would eventually resolve themselves. I personally would have preferred to see a more common integration with OpenLDAP. Some of the IRC daemons can use LDAP, but it is more of an after-thought, or bolt on. This would have allowed splits to occur without losing channel permissions and clients could be configured to quickly attach to another server in another region and that is just DNS management. This could have been further improved by amending or replacing the IRC RFC&#x27;s to allow SRV records. This may have been done by now for all I know. I shut down my last public server some time ago.<p>There is a lot more to this than I could sum up on HN. Anyway, today you can fire up an IRCd of your choice on modern hardware and accept tens of thousands if not hundreds of thousands of people on a single server if you wish. It is technically possible. I would still design the network to have multiple servers, as you will eventually hit a bottleneck. If you really want to do this, you will have to de-tune the anti-ddos counter measures to allow the thundering herd to join your standby server or make code changes to permit the thundering herd briefly on fail-over.
评论 #28502306 未加载
评论 #28500674 未加载
评论 #28500481 未加载
评论 #28501042 未加载
评论 #28500828 未加载
评论 #28500259 未加载
k__超过 3 年前
So its users can get fun netsplits.<p>I remember we would all try to get on the same server in our channel, but some less technical people would use a web client that assigned different ones every time.
300bps超过 3 年前
One thing I haven’t seen covered is multiple servers = redundancy.<p>If a server goes down, having a net split is a lot better than having the entire network down.
throwthere超过 3 年前
I don’t know if the numbers are realistic here. First and most importantly, messages are only sent to clients in the same chatroom, not sever wide. Second, 10% of users are only very rarely going to send messages at once. By rare you can probably substitute never. This, this is simple very small text messages where seconds of lag don’t really matter— why would it be hard to manage tens of thousands of concurrent connections?whatsapp crushed millions of connections on single server back in 2012— <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140501234954&#x2F;https:&#x2F;&#x2F;blog.whatsapp.com&#x2F;196&#x2F;1-million-is-so-2011" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140501234954&#x2F;https:&#x2F;&#x2F;blog.what...</a>
jbverschoor超过 3 年前
Because many of the early protocols, including IP, we’re designed with network failures in mind.
hcykb超过 3 年前
Because when IRC was popular servers and routes went down often and a single server couldn&#x27;t handle all the users a network would have. Neither of those are a concern anymore.
jimjams超过 3 年前
In reality only guys in the same channel get sent the messages... if messages are spread between even a few channels the autual numbers are much more manageable for one server.
nathias超过 3 年前
The side effect was also great for communities on .net servers that didn&#x27;t have services like user accounts and channels. Channel ops were battle-won and people who had them were much better at not sucking completely.
评论 #28503019 未加载
rawoke083600超过 3 年前
Would be fun to visit the old problems(like this one) with modern toolset. Say golang with channels(not the &#x2F;join type of channels) :p
prdonahue超过 3 年前
So you can nick collide people, obviously.
unixhero超过 3 年前
Engineering IRC networks is si much fun.