by zepolen · 16y ago · 0 comments
That way deploying more photo servers for speed just requires nginx and a few lines of config.
A couple notes:
1. Make sure you partition your data on your local disk properly so that there are never more than ~5000 files per directory, you can use nginx rewrite rules to do this for you (and make nginx save the actual url to nested folders).
2. If possible, make thumbnails smaller than 4kb.
2. Good tip - we try to use our judgement here balancing good design/good performance. We tend to opt for a pretty website first, then go back and make it faster with optimization.
location ~ "/(.*)" {
root /whatever/$1;
You could even do: set $subdir $1;
so that it can be used in another location handler.