The file system for avatars


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/code-flow.club/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
14 views
The challenge is the storage of hundreds of thousands of small images in the database don't want to keep. In ext3. What would you recommend? Maybe there is some demon or filoa system that is designed for this?
by | 14 views

7 Answers

0 like 0 dislike
Google reveals nothing, probably ready present. While the knee was born the following decision.
\r
1) In the main database (mysql) to store all the meta info + key for pictures. The key is (the name of the sqlite file + id)
\r
2) There are a bunch of small (100-200MB) files sqlite are blobs stored image.
\r
Since the write is append only and the previous doesn't change, then a daily backup will only get the last sqlite file.
\r
What do you say? nonsense?
by
0 like 0 dislike
And I honestly would advise base, recently copied its these "small image" — 600K they are there — took a day. Then we were — the two felts on, roofing felts on three gigs
Another horse well-practiced tarfs — but it does readonly
by
0 like 0 dislike
long ago the answer to this question could be reiserfs
by
0 like 0 dislike
Btrfs + storing multiple images in a single file and specifying the item in the url or somewhere else. Read about the facebook architecture and contact, there is a lot of useful information.
by
0 like 0 dislike
Think about what avatar is most likely a lot of read requests.
When you return them from the database you will rape the disk subsystem, while when you return from disk _all_ avatars (depending on the server memory) can be cached in system memory and their impact will be turbojet.
by
0 like 0 dislike
Pictures should be stored on the hard disk and no data base will not fit here because it creates unnecessary load on the server. And what about how to store it, I would recommend to split into subfolders by id-photo like this: if pictures < 100k, that's enough /ff/32123e21.jpg. If > 100k && < 2m, then /ff/ff/321312312.jpg well, and c /ff/ff/ff/321312312.jpg in space...
by
0 like 0 dislike
And, depending on the needs, you can use a database like Derby — it is in itself always consists of tens of files, regardless of the number of tables in it
by

Related questions

0 like 0 dislike
7 answers
asked Mar 24, 2019 by E_user
0 like 0 dislike
1 answer
0 like 0 dislike
5 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
23,397 users