I don’t know if it is the right way to go, and I hope to hear from you
if it
is not.
My concern is about the selection of a file traversing a tree. I have a
bunch of hashed directories (dozens of millions) on different servers.
As for performance reasons, I would like to avoid having to many
sub-directories in the same directory.
I would rather have this scheme :
1234/5678/90AB/CDEF/1234/5678/90AB/CDEF/myfile
It would help proxying to the right server and so on.
Will the traverse be fast enought ? Every directory is approx 100kb
heavy
(really light).
But other than openresty, i didn’t see any implementation inside nginx
to
split any word or cookie. C is faster than lua, so it would be a good
bet.
Well, I think.
It looks somewhat ugly because of 32 variables (aso because you need to
use
named ones (since $10/$11 … wouldnt work)).
There are probably much better ways to do this, but as a proof of
concept it
works: