Home >Backend Development >PHP Tutorial >Please guide me on how to evenly distribute and generate log files that store tens of millions of users.

Please guide me on how to evenly distribute and generate log files that store tens of millions of users.

WBOY
WBOYOriginal
2016-08-10 09:07:34940browse

The unique identifier of the user is a random number generated from 111111111~999999999
The estimated number of users in the future is tens of millions
The coordinate points uploaded by the user are stored to draw the action trajectory and are not stored in the log file generated by the database
I use the modulus Algorithm to distribute
Or use hash to distribute
If you use hash to distribute, please explain in detail.

Reply content:

The unique identifier of the user is a random number generated from 111111111~999999999
The estimated number of users in the future is tens of millions
The coordinate points uploaded by the user are stored to draw the action trajectory and are not stored in the log file generated by the database
I use the modulus Algorithm to distribute
Or use hash to distribute
If you use hash to distribute, please explain in detail.

NoSQL is used for log storage, such as mongodb, hbase or elasticsearch, and sharding is automatically done for you

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn