Environment: MySQL (database) + Redis (cache)
Scenario: List of forum posts
with pagination
Need to sort by time/heat/etc
You need to show the title and content in the list
Concurrency: Spikes may be up to tens of thousands of, but the duration may be one day, and read and write may be more frequent
Reply content:
Environment: MySQL (database) + Redis (cache)
Scenario: List of forum posts
with pagination
Need to sort by time/heat/etc
You need to show the title and content in the list
Concurrency: Spikes may be up to tens of thousands of, but the duration may be one day, and read and write may be more frequent
It is recommended to asynchronously, using timed tasks to go to MySQL in accordance with all rules to order the data sorted into Redis, sort by time into redis, sort by heat into redis, when the order into the Redis after the paging is very simple.