Article View: news.software.nntp
Article #63123Re: Is this a valid Message-ID?
From: Curt Welch
Date: Tue, 14 Jan 2003 22:11
Date: Tue, 14 Jan 2003 22:11
228 lines
12528 bytes
12528 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > > > A far better approach to Message-ID generation would be to drop the RHS > > completly beause it's only a poor use of unique bits and instead > > specify a format like this: <date.random> > I think you're putting way too much faith in random numbers. I think Usenet swtiched to that faith about 10 years ago with the relase of C-News. Is that when the old numbering system when out the door? It's not just a faith anymore, it's what everyone uses. It's the only way it can practically be done. Previously, the concept was to create one ID generator per host, and put the host name after the @, and the unqiue ID in the LHS. We long since dropped that. We lost both the "one host" concept and the "one generator" concept years ago. Besides, the "one generator" concept proved to cause more collisions than using a few good random numbers anyway. > The average > programmer has no idea how to generate a random number with more than > about 32 bits of randomness, Why not give them some help? You are forced to use them with Message-IDs now. We seem to be stuck in a world of people denying that random numbers are how message-IDs are generated today. > and that's only if they're lucky, don't > botch it up, and their operating system provides decent random number > generation functions (which is more common than it used to, but still > isn't all that common). MD5 of the message being posted is a good way to get 128 bits. Combine the current time with the message and take an MD5 of that and you probably have more than enough bits for the message-id. That's a simple way for any news-posting client to generate good random numbers without any OS support. Throw in more local data (like the last Message-ID generated or anything else the application can get it's hands on), and it only gets better. > And because of the birthday paradox, you need > more randomness than people expect. Only twice as much. But this is my point. The RFC shouldn't say "they must be unique", they should say something like "it must have N bits of randomness" and give people some help with understanding the "quality" of the random bits they use and suggest ideas of how to get good random bits on an OS which doesn't give you /dev/random. > I still think a better way to tackle this problem is to provide the user > a standardized way of requesting a message ID from the server in those > cases where the news reader actually cares about what message ID is used. Yeah, it would be easier to get the servers to "do it right" than to get all the clients to do it right. And news servers have access to a very high volume noise source for helping to generate good random numbers. But you still have the general problem that people writing servers still need to know what's needed. The real issue however is that Message-ID generation isn't a problem so it doesn't need to be fixed. I just like to talk about people's mis-conceptions on the issues. > > The RHS is currently only serving to add a few bits of randomness to > > each Message-ID > > It seems to me that it's doing more than that. You're analysis seems to > assume a completely hostile network where everyone is using everyone > else's domain names at random, which isn't actually the case. Yeah, what I say to try and make a point is not really an "analysis". But, no, I don't think I'm as far off as you assume. But I haven't really done an analysis to find out what the truth is. > When > properly used, the RHS guarantees that you're not competing with anyone > else in the world for message ID space, which makes uniqueness far easier > to approach. Not at all. Many news clients which make up message IDs use either the NNTP server's domain name or the users e-mail address domain name. And they all end up completing with each other on the LHS. And all they have to work with for the LHS is the date and random numbers. Using domain names on the RHS doesn't solve the problem, it only divides the problem space into multiple smaller problems. If everyone were to generate a 10 bit random number and put it as the RHS, then you would have a divided the problem space into 1024 somewhat equal sized domains. If every copy of one of the most popular newsreaders puts @4ax.com on the RHS, then it has carved out a very large part of the problem space which now needs to be solved by what is put on the LHS. To get some real data, I grabed about 10,000 Message-IDs from a news spool on a transit server and extrated the RHS and counted the dups. Of that 10, 000 set sample, here are the 15 most popular (it wasn't a very random sample BTW because it was on server which is biased on who it receives posts from and it spaned a very limited period of time so a burst of posts from the same server in that time frame would skew the results): 158 4ax.com 158 reader13.wxs.nl 163 fe02 174 FE06 174 dreader6.news.xs4all.nl 197 dreader5.news.xs4all.nl 210 fe08 225 news.wanadoo.nl 287 post-02.news.easynews.com 309 news.teranews.com 312 post-03.news.easynews.com 369 giganews.com 369 news4.srv.hcvlny.cv.net 434 Flipper 1062 news.easynews.com But none the less, I think this distribution is typical anyway even though the sample may be too small and too biased to give accurate numbers for each domain shown above. And it shows that 1 out of every 10 posts ends with "news.easynews.com". So the problem of generating Messages-IDs for easynews is the same as the probelm of generating unique messgae-IDs for 1/10 of all of Usenet. And though a lot might be generated by the easynews servers, a lot are also probably generated by news clients. Dividing the usenet message-ID generation problem into 1/10 is the same as adding something like 3.3 random bits to the Message-ID. So "news.easynews.com" is something like 100 real bits of information added to the Message-ID but only manages to break the problem space down as much as 3.3 random bits would. 4ax.com is around 5.9 bits of randomness. The above 15 RHSs represents 46% of all the messages in my sample set, yet the number of bits of randomness is less than 8 for each of those. Because my sample set only included 10,000 message-ids, that means the number of bits of the most unique numbers was only about 13. But if you were to calcaute the number of bits per RHS over Usenet over a given period of time, and average the number of bits for each RHS used, I suspect you would find it was around 8 (order of magnatuted), and that in general, if everyone instead was generating only 10 random bits in place of the RHS, you would get a better distribution of the probelm space than we do now with the use of domain names and other crap (like Flipper or "fe02") in the RHS. > If other pepole use your RHS without your permission, That problem is not the issue even though I mention it as being "possbile" (clearly with a very very low probability). The issue is that tons of independent and uncontroled and uncoordinated message-ID generation algorithms are at work sharing the same RHS doman names. And within each RHS domain-space, we have the same problem which exists for all of Usenet on the LHS just on a slightly smaller scale. I'm not aware of any message-id generation algorithm in use today that even trys to coorditate it's work even with itself. i.e,. every message-id generated is totally independent of every other one generated. Do any news-server based algorithms even bother to check for dups in their history when they generate a message-ID? Mine doesn't. It will check when the article is posted, but by then, it's lost. Using unique domain names on the RHS of a Message-ID in no way guarantees uniqueness. It's nieve to put wording into an RFC that implies it does, or that implies "uniqueness" is even remotely possible today. In the end, you still have millions of independent message-id generating algorithms at work with randomness as their only real tool to work with and all they can really hope to acheive is to reduce the probability of a collision to below an acceptable level which isn't even specified in the RFC. Domain names, because of their very lopsided distribution, are a poor tool for dividing the problem space down. Time stamps are a much better tool, but because of the growth of Usenet, they too are lopsided. Just not nearly as bad as domain names. Even when clocks on PCs are set wrong (by decades even), they do at least tend to "run", so every message generated more than a second apart will have a different time-stamp. What people who write Message-ID generation algorithms need to know is how much randomness is needed, but the RFC gives them no help with that. Some stick in way too much, others, probably not enough. What is the current "noise level" of usenet in terms of messages being randomly lost? That includes posts that fail to make it to usenet because of some software bug. i.e, how many times a day does someone write a message and try to post it to usenet only to have it not make it out to most of Usenet? How many times is a message sent but yet fails to make it to some percentage of the Usenet users? How many messages that "should" be stored in the arcives like Google never make it there because of some "accident"? These numbers are very high. Thousands per day. The number of bits in the Message-ID only needs to be large enough to make the "message-lost-because of a dup Message-ID" problem be significant less than all the other problems which cause messages to be lost. If 1 message a day is lost (and that's way below what really happens), then that's 1 out of 2 million. And if "significant less" means 1 out of a million, then the acceptable collision rate is around 1 out of 10^12. So, because of the birthday paradox issue, you need a random space size of 10^24 or so, which is the same as 2^80. So all you need is around 80 bits of randomness in each message ID to make the probablitly that a message is lost because of dup message-ids to be a million times smaller than all the other reasons they get lost. Or, that's 14 base64 characters: <u72Kekf0kDjmfZ> If my very off-the-cuff calculations are correct, the above is more than enough to "guarantee uniqueness to an accpetable level" on Usenet. But yet, the typical message ID looks like this: <ilRU9.11573$WT3.4155@news.bellsouth.net> Which is 2 to 3 times longer than they probably should be and which might include less random bits than is really needed. or: <5kl72voe0ergmi4ejmj8jtc7icogdcakis@4ax.com> Which probably includes about 100 more bits than is needed. (log2(33^36)=181 which is 101 past 80). I don't really think we should bother changing the RFCs, I just like to point out that many people don't really understand the issues of what we are dealing with here. And I'm no math expert, so some of my assuptions are likely to be mis-guided as well. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20030114171106.956$rG@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!chi1.webusenet.com!rip!news.webusenet.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<4o6cfxfd2.ln2@thune.mrc-home.org> <1rvg0sbd7t.fsf@vingodur.ifi.uio.no> <8dqRqDeocDD@3247.org> <20030114132134.418$09@newsreader.com> <yld6mz8s6f.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <20030114171106.956$rG@newsreader.com>
Subject: Re: Is this a valid Message-ID?
Date: Tue, 14 Jan 2003 22:11:06 +0000
From: curt@kcwc.com (Curt Welch)
References: <4o6cfxfd2.ln2@thune.mrc-home.org> <1rvg0sbd7t.fsf@vingodur.ifi.uio.no> <8dqRqDeocDD@3247.org> <20030114132134.418$09@newsreader.com> <yld6mz8s6f.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!chi1.webusenet.com!rip!news.webusenet.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com iO0Cq@yMkyyRunwz+Ut2/89VT+H06iQwRPXO5DCFC3TVvcjQ
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 227