how store images your filesystem
currently, i've got images (max. 6mb) stored blob innodb table.
as distance information growing, nightly backup flourishing slower slower opposition normal performance.
so, binary information needs record system. (pointers files kept db.)
the information tree relation:
- sure site
- user_0
- album_0
- album_1
- album_n
- user_1
- user_n
etc...
now i wish information distributed regularly tray office structure. should i accomplish this?
i speculation i try md5('userid, albumid, imageid');
cut adult indirect twine office path:
/var/imagestorage/f/347e/013b/c042/51cf/985f7ad0daa987d.jpeg
this grant me map initial impression server regularly liberate office structure over churned servers.
this however not keep images organized per user, approaching swelling images 1 manuscript over churned servers.
my doubt is:
what best proceed store settlement information record component homogeneous way, while retaining user/album information together ?
am i pondering right direction? wrong proceed doing things altogether?
update:
i md5(user_id)
twine rupturing separate adult top level.
and following put user information same bucket. pledge an even chain information while retaining user information stored tie together.
/var
- imagestorage
- f/347e/013b
- f347e013bc04251cf985f7ad0daa987d
- 0
- album1_10
- picture_1.jpeg
- 1
- album1_1
- picture_2.jpeg
- picture_3.jpeg
- album1_11
- picture_n.jpeg
- n
- album1_n
i cruise i albumid splitted adult behind (i idea!) keep array albums per office smaller (although won't required many users).
thanks!
Comments
Post a Comment