Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Facebook Goes To 64 Bit User IDs

Posted by Zonk on Sat Oct 20, 2007 10:34 PM
from the internet-users-on-mars-or-europa-can-expect-to-sign-up-soon dept.
NewsCloud writes "Facebook has announced to developers that they are moving to a 64 bit user ID in November. At 32 bits, the current ID allows nearly 4.3 billion user accounts. Yet, despite having only 47 million users today, Facebook's move to 64 bits will allow it to have more than 18 quintillion (18,446,744,074,000,000,000) user accounts. Of course, there are currently only about 6.5 billion people in the world. Is Facebook setting their sights beyond Earth or just trying to avoid what happened when Slashdot ran out of space for comment IDs last year. Perhaps they are planning to implement personas."
+ -
story

Related Stories

[+] News: Slashdot Posting Bug Infuriates Haggard Admins 262 comments
Last night we crossed over 16,777,216 comments in the database. The wise amongst you might note that this number is 2^24, or in MySQLese an unsigned mediumint. Unfortunately, like 5 years ago we changed our primary keys in the comment table to unsigned int (32 bits, or 4.1 billion) but neglected to change the index that handles parents. We're awesome! Fixing is a simple ALTER TABLE statement... but on a table that is 16 million rows long, our system will take 3+ hours to do it, during which time there can be no posting. So today, we're disabling threading and will enable it again later tonight. Sorry for the inconvenience. We shall flog ourselves appropriately. Update: 11/10 12:52 GMT by J : It's fixed.
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by langelgjm (860756) on Saturday October 20 2007, @10:41PM (#21060087) Journal
    Reminds me of a Facebook group: "If this group reaches 4,294,967,296 it might cause an integer overflow."
    • "If this group reaches 4,294,967,296 it might cause an integer overflow."

      Obviously that group number wasn't computed using Excel.

    • Re: (Score:3, Insightful)

      The "We may not reach 4,294,967,296 members but..." discussion thread has been breaking the sad news about 64-bit storage for several months now.
  • Network ID (Score:3, Informative)

    by Deltaspectre (796409) on Saturday October 20 2007, @10:44PM (#21060093)
    One thing to keep in mind is the userid is network ID + user ID for that network
    For my user ID the network ID takes up the first 6 digits

    Although I have heard that they stopped this practice and are just assigning IDs
    • Re: (Score:3, Insightful)

      Why did they used to make part of the ID be a network identifier? What if you need to move users to other networks? I can perhaps see how it could make it possible to assign unique id's without central communication by making blocks of numbers to be pre-assigned by different regions, etc. But as a direct network allocator, it seems problematic.

      And why we are on the topic of ID's, why are Microsoft product ID's so damned long? They use letters, which gives them 35-base number set (including the digits, exclu
  • by endx7 (706884) on Saturday October 20 2007, @10:47PM (#21060101) Homepage Journal
    The "Slashdot ran out of space for comment IDs" link doesn't work.

    You can get to the referenced article at:
    http://meta.slashdot.org/article.pl?sid=06/11/09/1534204 [slashdot.org]
  • by Bruce McBruce (791094) <maulex@gmail.com> on Saturday October 20 2007, @10:52PM (#21060135)
    You can be your own 5000 best friends.
  • by Mostly a lurker (634878) on Saturday October 20 2007, @10:54PM (#21060151)

    Facebook's move to 64 bits will allow it to have more than 18 quintillion (18,446,744,074,000,000,000) user accounts. Of course, there are currently only about 6.5 billion people in the world. Is Facebook setting their sights beyond Earth ...?
    My assumption is that Facebook is betting on the success of the Vatican's campaign against birth control. I just cannot imagine extra terrestrials being willing to put up with the multi-year latency required to post and retrieve photos from an earth-based server.
  • thank god (Score:5, Funny)

    by friedman101 (618627) on Saturday October 20 2007, @10:55PM (#21060165)
    finally I can register my bacteria colony!!

    staphylococcus aureus #19392133943904 is in a relationship with staphylococcus caprae #93939394839483934
  • News? (Score:5, Insightful)

    by JRGhaddar (448765) on Saturday October 20 2007, @10:58PM (#21060191)
    This has to one of the dumbest articles to reach the slashdot headlines.

    So basically facebook changed there maximum users from a huge number to an even bigger number.

    Are we going to post a news story everytime google adds to their storage system?
    or microsoft adds another bloated line of code?
    or everytime the telco's build a tower?

    • It's funny. Laugh. (Score:5, Informative)

      by SanityInAnarchy (655584) <ninja@slaphack.com> on Saturday October 20 2007, @11:12PM (#21060295) Journal

      So basically facebook changed there maximum users from a huge number to an even bigger number.

      The difference being that the current (huge) number was not quite sufficient to register all human beings on the planet, so we have to wonder why they did this. 32-bit integers are kind of the default, so most people wouldn't worry about it. So why are they doing this?

      If you look, this article is filed under "It's funny. Laugh." And it is, really. Either Facebook is doing this for no good reason, or someone actually has some justification for going to the time and expense to change their database in this way. And so... Are they really planning on registering more human beings that exist?

      I realize it's not funny to you now, as you've had to have the joke explained to you...

      Are we going to post a news story everytime google adds to their storage system?

      If they suddenly went from 2 gigs of email to 5 exabytes, then yes.

      Also, keep in mind that Slashdot did cover when Gmail was first released with that 2 gigs, which seemed impossibly huge, and was at least one or two orders of magnitude larger than their closest competitor.

      • If you read the article, it refers to event IDs. Which means, of course, that everything (?) that happens on Facebook is assigned an integer and they were running out of integers or at least foresaw that possibility. This is much, much more reasonable than wanting to register more people than exist on the earth right now. But it makes it a lot less newsworthy, and a whole lot more boring.
    • yes, we finally decided that the slashdot community has seen enough ads for apple gear.

      ~the people who come up with repetitive slashdot stories
    • You don't understand. This is a *major* improvement. After all, they haven't just increased a little bit the number of possible users, they've *multiplied* it by about 4 billions. That's a 40,000,000% increase!
    • Are we going to post a news story everytime google adds to their storage system?

      I seem to remember an article poking fun at the fact google's email space isn't "infinite" like some other services so if they doubled or tripled their limit I guess it would be on the front page.

      or microsoft adds another bloated line of code?

      Windows Vista articles?

      or everytime the telco's build a tower?

      articles about the irrational fear of wifi and the "dangers" of cell phone towers, I believe we've seen that too. so yes, t

    • Re: (Score:3, Informative)

      by Anonymous Coward

      Are we going to post a news story everytime google adds to their storage system?

      Answer: Why yes, I believe they will.

  • Two-Faced (Score:5, Funny)

    by Nom du Keyboard (633989) on Saturday October 20 2007, @11:03PM (#21060223)
    Clearly this is meant to accommodate two-faced people, people of multi-faced discrimination, and Hexadecimal.
  • I for one will take go with Facebook's initiative to welcome our new alien overlords who will certainly see Facebook's superiority to Myspace.
  • Not just user IDs (Score:5, Interesting)

    by digital bath (650895) on Saturday October 20 2007, @11:06PM (#21060253) Homepage
    TFA says nothing specific to 'user ids' - it says object ids in general. I assume this includes things like comment ids, event ids, etc - which makes overflowing the 32 bit limit much more reasonable.
    • Re: (Score:2, Informative)

      It does actually "Up until this point, all of our user IDs have been small enough that 32 bits is sufficient to store them all. In the not-so-distant future, we will begin using 64 bit object IDs in some places. So, the numbers will become to big to handle in some situations" The wording is actually pretty shocking so it could well be that the userid's are being made 64 bit but comments etc. are, or it could be they are making userid's 64 bit also.
      • Up until this point, all of our user IDs have been small enough that 32 bits is sufficient to store them all. In the not-so-distant future, we will begin using 64 bit object IDs in some places. So, the numbers will become to big to handle in some situations

        Seems pretty clear:
        1. User IDs are currently 32 bits.
        2. They are changing some object IDs to 64 bits.
        It does not say they are changing user IDs to 64 bits. It's implied but not stated. It's not actually clear that "user ID" means the ID of an account - it might just mean a user-visible ID (such as comments have on Slashdot).

      • by jd (1658) <imipak@@@yahoo...com> on Sunday October 21 2007, @01:35AM (#21060895) Homepage Journal
        My interpretation (which is just as invalid as everyone else's, Facebook included) would be that they are abolishing UserIDs altogether and switching to a 64-bit universal ID. That kinda makes sense, as it would make defining relationships between any two types of object easy.
  • Facebook's move to 64 bits will allow it to have more than 18 quintillion (18,446,744,074,000,000,000) user accounts. Of course, there are currently only about 6.5 billion people in the world. Is Facebook setting their sights beyond Earth
    Probably just means they don't have to worry about needing to reuse IDs of inactive accounts...

  • by istartedi (132515) on Saturday October 20 2007, @11:07PM (#21060261) Journal

    If you think you might ever have more than 2^32 of something, you kind of have to go to 2^64. Yes. It's an obscene ammount of possibilities; but it's the next biggest size. You really don't have much of a choice here. You could implement 5-byte numbers, but it'd be a PiTA. No CPUs have native 5-byte ints. The progression has always been a doubling of int size.

    If that doesn't make sense, you shouldn't be on Slashdot. Maybe you should be someplace else... like Facebook maybe?

    • >>but it's the next biggest size

      Ah, no, it isn't. Just as an example, right off the top of my head, they could go from 32 bits to 34 bits, giving them an extra 12,884,901,888 ids. Or 2 for every person on the planet.

      Or they could round it off at a nice 40, for a healthy 1,099,511,627,776 -- roughly a trillion users.

      There is absolutely no rule that says "need bigger than 32 bit -- must choose 64 bit".
      • There is absolutely no rule that says "need bigger than 32 bit -- must choose 64 bit".
        Except that it'd be a real son of a bitch to have to shift bits around every time you want to calculate user IDs.
    • If you are concerned about storage space mysql has 48bit storage type.
  • They have to do something, what with all those pretty girls wanting to get to know me and give me private shows...
    • Re:Spammers (Score:4, Funny)

      by dricci (470949) on Sunday October 21 2007, @03:37AM (#21061359)
      I think you're confusing Facebook with MySpace, which doesn't have this problem as they appear to still use a flat-file database updated in notepad.
  • There is a group trying to cause an integer overflow; either from comment or member numbers. This may impede their (hopeless) progress. It is titled, "If this group reaches 4,294,967,296 it might cause an integer overflow."
  • Number of People (Score:5, Insightful)

    by Bullseye_blam (589856) <bullseye_1@yahooNETBSD.com minus bsd> on Saturday October 20 2007, @11:18PM (#21060337) Journal
    The other thing to remember is that there might be a certain number of people in the world at any one time, but that people are born and die within that time [and old ones won't be deleted]. I don't think it's inconceivable that Facebook might reach their current limit in 20-25 years.
  • by Jay L (74152) <jay+slash@@@jay...fm> on Saturday October 20 2007, @11:23PM (#21060363) Homepage
    Even it if it's just user IDs, and not object IDs as another user posted...

    * 64-bit user IDs are easier to partition. They could be using the top N bits as a database ID.

    * They may want to allocate the IDs randomly instead of sequentially. 64-bit IDs would involve fewer collisions.

    * We don't know what their account churn rate is; if people sign up, forget, and create new accounts again frequently, they could have many more than 47 million dormant accounts sitting around.

    A 32-bit ID really does get cramped when you have a large user base.
  • by pushing-robot (1037830) on Saturday October 20 2007, @11:25PM (#21060369)
    64 bits are WAY FASTER [pcworld.com] than 32 bits!
  • I don't know anything about what you can or can't do with a facebook id number, but it could be a way to increase the sparseness so they're harder to guess for some sort of security reason (well founded or not...)?
  • ...is it backwards compatible with web 1.0...?
  • by Kaz Kylheku (1484) on Sunday October 21 2007, @12:23AM (#21060621)
    Not all of the bits of an ID are necessarily there for uniqueness. Wider ID's allow for features such as check digits (being able to tell whether an ID is valid without doing an existence query in a remote database) and other information. Namely, various immutable properties of the object that is denoted by the ID can be stored in the ID itself. This is similar to using spare bits within a machine address for tagging an object with a type or other attribute. It may be very useful to be able to tell something about an object just from the ID alone.
  • Or maybe it just means they don't want to disable and reclaim/recycle the 20 idle/unused/abandoned IDs each person has... Or did you really think over 1 million people that read Slashdot registered for accounts (just one each)?
  • They actually are increasing the Object ID to 64-bits. The announcement is confusingly written, given, but objects in their system are things like events, groups, and basically everything. It's easy to imagine that they would hit the 32-bit limit on these at some point.
  • ... more then one facebook account. I know I have.
  • by ChronosWS (706209) on Sunday October 21 2007, @01:38AM (#21060903)

    So they changed the column type of userId from INT32 to INT64. Who gives a fuck? It would be much less expensive for Slashdot to simply post SQL change logs than to have editors on the clock.

    We need the ability to mod stories, so that the editors can more clearly see when they aren't doing their job.

  • by suv4x4 (956391) on Sunday October 21 2007, @02:08AM (#21061019)
    I just changed the type of column "content" on my blog from "text" to "mediumtext". I'm ready to give a press conference as to the reason behind my decision to all interested.
    • Re: (Score:3, Insightful)

      > I'm ready to give a press conference as to the reason behind my decision to all interested.

      ie, "I will definitely call my mom about this."
  • by drolli (522659) on Sunday October 21 2007, @02:19AM (#21061051) Journal
    -you can harden your security by populating the user-id space sparsely. Somebody who is guessing for an user id will have an hard time.

    -It can make things easier to have your user groups organized according to geographic location, company issuing th id (e.g. local branch), etc.

    -Multiple log ins. Who knows. maybe it is easier to associate internally several uids with each uid (could make things more static).

    So let's say:

    10 bit for segmentation
    20 for checksumming
    4 for multiple logins

    leaves only 29 bit as payload

    Or somebody was just dumb and wanted to make sure he is not fired until all applicaitons are switched
    • Now, you can probably set up a bot net to give you a few million and noone would notice.
    • Ironically (or not - your choice), the post advising developers of this change contains a spelling error. No biggy, really...I mean who knows that "to" means one thing and "too" another? Certainly not someone posting advisories to developers on a little site like Facebook...

      LOL. Our guys send out typo riddled notices all the time. They need more console love, an AIX terminal is very unforgiving of typos...oh crap I just brought a ton of sites down, I meant status, not stop!