How does Facebook generate your ID when you join the site? While new users of the site aren’t aware of the use of numerical IDs, since the beginning Facebook’s profile system has been based on IDs to identify each user. While the site first began by auto-incrementing IDs, the model that the site has used for generating these IDs has changed over time. The history of the Facebook ID isn’t a regularly discussed topic among most users, however one Quora user posted the question and Justin Mitchell posted a great response.
According to Justin, here’s the history of the Facebook ID:
This is my understanding, but I’m probably wrong.
Facebook’s user ID schema reflects the history of the site as it transitioned from a single-server single-school operation to 400 million users. User ID assignment has gone through several phases, notably:
Harvard only. Facebook (or thefacebook.com, as it was called back then) was opened up to Harvard running off a single box that had mysql and apache. IDs were auto-incremented, starting at 4 (hi Zuck).
Other schools. Other schools were initially completely separate sites, operating on their own boxes. IDs were still auto-increment per SQL box, but each server/school had a different prefix. For instance, all Columbia IDs are between 100000-199999 and all Stanford IDs are between 200000-299999. You can determine what school any early Facebook user attended based on his or her user ID.
High schools. Someone must have figured out that this ID system didn’t scale very well, so Facebook changed its DB layout when high schools were introduced. While all the college users maintained their current DB, high school users were randomly assigned to one of many many high school DBs. These users IDs hash to the correct database, rather than simply being floor(ID / 100000).
Open registration. Facebook maintained a similar layout once open reg was launched, except the new databases weren’t signified as “high school.”
64 bit. Given Facebook’s growth rate, it was estimated that the entire world would be on the site by 2011, overflowing 32-bit space. While we considered limiting the site to the first 4-billion people to register and lobbying governments to reduce the world’s population, the growth team pushed pretty hard to just increase the ID space to 64-bit.





![[Inside Social Apps 2012]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/ISA2012_336x100_F_RegisterNow.gif)
![[AllFacebook Stats: Facebook Analytics for Your Business]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/stpro_allfacebookstats.gif)
![[How can Facebook change your business?]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/FMB_A_MAY2011_336x100_F.gif)


i think thats pretty cool.
However if one figures out the range for each colege.
And the person's id is visible on search (am asuming). And the person wants to hide its location.
U cud technicaly figure out cudnt u ?
Just an asumption.
Comment by bill — August 13, 2010 @ 2:13 pm
My user ID# is lower than his, and most everyone elses. And yes I'm proud of that.
Comment by Guest — August 13, 2010 @ 2:14 pm
lmfap@While we considered limiting the site to the first 4-billion people to register and lobbying governments to reduce the world’s population, the growth team pushed pretty hard to just increase the ID space to 64-bit.
Comment by Robyn B. Holmes — August 13, 2010 @ 2:47 pm
Great breakdown! It is interesting to follow what Mark must have been thinking in the beginnings of FB and how the design was trying to scale. It is never an easy task to design a database up-front and make sure it can accommodate for future development.
Do you have a story on the Like button and how that one gets everywhere? I bet the Like button has a 128-bit ID!
Comment by Lorne Marr — August 13, 2010 @ 3:37 pm
Oh, and I also find it laughable that Zucks profile lists him as a Harvard Alum, when he is not. But then I guess it's semantics, since he doesn't go there anymore, and there are numerous definitions of "alum".
Comment by Guest — August 13, 2010 @ 6:13 pm
pleasefacebookid make
Comment by danish — August 13, 2010 @ 7:33 pm
you guys should cover the facebook error had yesterday.
making all the status/comment gone.. it resolved now. but some status still missing
Comment by ?? ?? — August 14, 2010 @ 10:33 pm
Hi : )
you are invited to a new application on facebook :
Bringing travelers in touch with"locals" and giving"locals" a chance to meet visitors from other…countries.
http://apps.facebook.com/smileypolka/index.php
please share (share button) it with your friends and help us to encourage inter-cultural interaction and promote tolerance among people with different nations and cultures.Thanks very much and have a great day.
please share (share button) it with your friends …and help us to encourage inter-cultural interaction and promote tolerance among people with different nations and cultures.
Thanks very much and have a great day
Comment by Amit Or — August 16, 2010 @ 8:53 am
Good thing they changed to 64bit, otherwise they would have faced the Y2K11 bug.
Comment by Badminton — January 14, 2011 @ 12:04 am