This does not require disk scan statistics, but rather the use of database statistics. This allows you to accurately record what files are available to the current user.
Two methods:
1. After the client uploads the file successfully, the HTTP post submits the database information. At least Apache backed, tens of thousands of per second is not a problem
For example, memory 2G, minus 500M left to the server, and 1.5G, then the maximum number of connections: around 8000:
Http://www.cnblogs.com/flyoo/archive/2013/05/31/3110499.html
If you switch to the go language, there's no problem.
2. The server does its own procedure, and once accepted, it fills in the database.
All operations rely on this server software, a little dangling. Moreover this server software also must write itself.
Background with MySQL or MongoDB database control, with go to accept HTTP requests. So the user's every move is under control. It's much easier to sync in different steps.