Page 1 of 1
youtube use file system or mysql database?
Posted: Wed May 27, 2009 11:23 pm
by dsick
i know with photo sites they use a combination of the database and the file system, is this the way youtube works? all my users pictures, and videos are saved in this directory
i wasn't quite sure which forum to put this in
but im pretty sure when you upload videos you upload to a directory on youtubes server..
could be wrong tho, but id rather work with my database than the file system
Re: youtube use file system or mysql database?
Posted: Thu May 28, 2009 2:57 am
by onion2k
YouTube use a custom version of BigTable, which is a very, very fast "database" for storing massive amounts of information that's based on GFS. It's not really a database like MySQL though, in so far as tables don't have "columns" in the traditional sense. It uses a "cloud" of data. It's a bit weird.
There's a free version based on Hadoop called hbase (
http://hadoop.apache.org/hbase/ ), but don't expect it to be anywhere near as easy to use as MySQL. It's
really complicated.
Re: youtube use file system or mysql database?
Posted: Fri May 29, 2009 4:07 am
by dsick
i can accomplish everything they do in mysql but im wondering were they put videos people upload at, it can be done by putting the video in the user ids video directory, if you make a id dir once users submit there registration data, some sites have the auto-incrementing id inside the database and another one on there server that has the users mp3s and what not inside their respective dirs
one question can you read an image from a database, or a video, i know it will show the image path but not the image its self.
Re: youtube use file system or mysql database?
Posted: Fri May 29, 2009 5:44 am
by onion2k
dsick wrote:one question can you read an image from a database, or a video, i know it will show the image path but not the image its self.
You can, but reading from a database is
very slow and memory intensive compared to reading from the filesystem. Your website would be considerably less scalable if you stored the data in a database table.