- Reading websites often have today"s page views, today"s posts, today"s comments and so on. Which statistical scheme is better?
- file + Cookie mode, the file on the server is emptied once in 24 hours. the dat file is accessed only once by the client cookie, user within 24 hours.
- data table records, these fields are extracted separately as a table, and then combined with ip records into the table.
- data table statistics. Use createTime and count aggregate functions to count these fields directly.
- Redis, puts the statistics into redis and expires within 24 hours.
do you have any good ways to do this?
after thinking about these schemes, I feel that each has its own advantages and disadvantages. For websites with a general ip volume of about 100000, which one is better?