I'm going to be generating about 50 million HTML files that I'd like to serve. Each file has a unique id (e.g., thingy) and I'd like to serve them up as if they were all in one directory (e.g., example.com/thingy).
I suspect that putting 50 million files in one directory is asking the gods to strike me down, so I'm inclined to do it with nested directories (e.g., thingy is in /t/h/i/thingy). I think I could do this with Apache and mod_rewrite without too much pain, but I'm wondering if there are other options that make more sense.
If it matters, I intend to do this on Linux.