Seems odd to me that the router hits a MySQL database on every single request rather than just hashing the hostname as the key for the filesystem node.
And you could probably have a (small) hashmap that allows overrides for the most used pages.
Use hashing for the rest. Ideally consistent hashing, or rendezvous hashing, which i just read about on Wikipedia so must be good:
Say you have 8 servers at present, you'd allocate 8192 sequential keys to each server.
If you need more capacity, use 16 servers instead, and move half the files from each server to the corresponding new server.
Thus exactly half the data is moved each time the number of servers is doubled or halved.