Scotty2024 Posted March 18, 2009 Share Posted March 18, 2009 I think this is the correct place to post this. Anyway, does anyone know how the photo system at facebook works? I am wondering the folder structure they are using. It looks like they are running their photo servers off of several subdomains of fbcdn.net (ie. http://photos-a.ak.fbcdn.net). I think they have only been using fbcdn.net for pictures for about a year and half or so. But anyway, they obviously can't put all the pictures into one giant folder. An example of the folder system is http://photos-d.ak.fbcdn.net/photos-ak-snc1/vWWWW/XX/YY/ZZZZZZZZZ/imageNum.jpg where W, X, Y and Z represent numbers. It looks like they have a few parent folders (W), which have a bunch of child folders (X, Y, Z). What is the threshold of the number of pictures allowed in a folder before a new one is made? Does every member's pictures just get thrown into the current folder (Z) until the threshold is met, or does every member get their own parent folder? What happens when an image is deleted? I know there have been some ToS issues about the pictures not actually being deleted, but lets assume this is a prefect world, does that folder "reopen" to allow another new picture to take its place? I'm not looking for exact answers, just hoping that someone might have an idea how the system works. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/ Share on other sites More sharing options...
corbin Posted March 18, 2009 Share Posted March 18, 2009 As far as I know, no one on the phpfreaks forum works for facebook, so I doubt anyone knows all of that. Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787298 Share on other sites More sharing options...
Scotty2024 Posted March 18, 2009 Author Share Posted March 18, 2009 Right. I dont think anyone knows all that. Which is why I said "I'm not looking for exact answers, just hoping that someone might have an idea how the system works." Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787303 Share on other sites More sharing options...
drisate Posted March 18, 2009 Share Posted March 18, 2009 My guess is that when you upload an image your image is uploaded to the less loaded server and each folder probably has a size limit after what the system auto creates the next folder. Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787327 Share on other sites More sharing options...
Scotty2024 Posted March 18, 2009 Author Share Posted March 18, 2009 Any guesses on on a max size limit for a folder? This doesn't have to be facebook specific. But in general, what is too large of a folder size? Also is it possible to have too many files in a folder that it would slow down the retrieval time it takes to find the file? Again this doesn't have to be facebook specific, just in general. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787425 Share on other sites More sharing options...
redarrow Posted March 18, 2009 Share Posted March 18, 2009 folders can be any size think when you add DVD films to folder's. there huge folders but don't effect the folder it self. so no a folder size can be any size. performance is all down to you, and your current host and there servers ask them?. when it comes down to face book, i guess they add folders as they grow, and put them on meny other servers. a folder can be server 10 and b folder can be server 20 so on. if you get a web site going that requires so much space your be rich i guess. who cares then you wont. find out the average size of a picture, and then see how meny fit to the size off the hard drive currently using, Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787472 Share on other sites More sharing options...
Scotty2024 Posted March 18, 2009 Author Share Posted March 18, 2009 Hello redarrow, So you are telling me that a folder can have an extremely large number of files in it (lets say 1 million files given the hard drive space) and the retrieval time of any given file will not be affected? Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787932 Share on other sites More sharing options...
MadTechie Posted March 18, 2009 Share Posted March 18, 2009 The number of files are limited by File System thats used for example on Windows NTFS the max diskspace would be 256 terabytes that can only handle 4,294,967,295 files per disk, So yeah theirs limits, i would guess that facebook has resource servers that host the images and the DNS is mapped to those servers for example the static images are NOT on the same server the as the apache server that hosts the PHP etc etc Quote Link to comment https://forums.phpfreaks.com/topic/149909-facebook-photo-system/#findComment-787945 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.