Blob or file system[)roi(];18644541 said:Always a bad idea.
Definitely agree on blob scalability hence why I leaned this way initially.http://dba.stackexchange.com/questions/2445/files-in-the-database-or-not
I personally always go blob.
File system or CDN.Blob or file system
(I ended up with file system + path in DB)
Definitely agree on blob scalability hence why I leaned this way initially.
CDN will resolve any scalability issue you may have.
Google recommends images stored as blobs - https://cloud.google.com/storage-options/
I'm interested in this but can't find a refernce on the linked page ..
Unless you're meaning Google Cloud Storage (which is their offering of EC2) or Firebase which is backed by GCS .. ?
Ahh sorry I did not think of it as EC2, I was selective reading
I still use the PHP version of faker to do this kind of thing, you should check it out.
CDNs are in practice no more difficult to employ than a local file system store; usage is naturally based on reducing latency by transparently routing requests to the nearest CDN cache (nearest i.t.o. latency and/or geography)Blob is free CDN is not - at least not that I am aware of? ( I am not too clued up on a CDN, but it feels there will have to be a significant amount of work to be done in order to implement a CDN correctly and I would be one of those people who would rather do cdn.thisdomain.co.za since places like trello has 40 cdns all over the place making it a nightmare to whitelist.
I went with the file system method, although I am going to setup a mirror of this project one with file system and one with blob and then will put it on githib and then like everyone to test the bezeezus out of it so we can see where the threshold is like when does the inode overhead become an issue.
Google recommends images stored as blobs - https://cloud.google.com/storage-options/
Gravatar?I get the appeal but trust me the majority of people have no clue about hosted file repos or imeger and the likes and want if they are down etc etc.
I want it easy, drag image here.
Done.
Ahh sorry I did not think of it as EC2, I was selective reading
View attachment 400595
What I ended up doing is serving the following from the DB
- Favicons
- Sprites
- Invoice header
- Email header
The rest - User generated images -> all file system
I chose this based on what I read here
http://www.sqlite.org/intern-v-extern-blob.html
I understand sqlite is not mySQL, but I also read this -> https://www.microsoft.com/en-us/research/wp-content/uploads/2006/04/tr-2006-45.pdf which is MS SQL again not mySQL, but the resemblance is clear objects smaller than 256K are best stored in a database while objects larger than 1M are best stored in the filesystem. Between 256K and 1M, the read:write ratio and rate of object overwrite or replacement are important factors.
The biggest issue with this is that I need to test this in a modern world as all the research on it is ancient that article is from 2006 so SSDs would not have been something they would be able to imagine.
So now I think it becomes a DB vs SSD I/O question.
Does anyone have an account to this service? -> https://www.mockaroo.com/
I would like to download 500,000 rows and play around.
Yea link to the study is above in my reply.Gravatar?
Anyway, Microsoft did a study a good couple of years back regarding this and found that if images are smaller than a specific size it's better to go database.
Yea link to the study is above in my reply.
Issue is its 2006, SSDs might give it a run for its money
1. From a MySQL (MyISAM) table with 2 columns: ID (int, auto_increment) and DATA (mediumblob)
2. Using read file.
3. The third test method, "FS", simply loads the image over HTTP directly, without any intermediary scripts.
![]()
The results are the average of running Apache Benchmark 10 times: 10 concurrent requests, 1000 requests per run.