How to use redis in online examination system?

thinkphp+mysql+redis, is used in the background to arrange on-site exams every period of time, about 100 people. At ordinary times, 3000 people will take mock exam training.

my idea: formal examination, give out 100 sets of papers, except that there are 100 sets of papers in the database, put the same 100 sets of papers in redis. In this way, candidates load the test papers in redis directly, do not have a relationship with the database, and send the Synchronize test results to the database, while emptying the redis.

is this consideration necessary?

Jan.31,2022

if you use Synchronize data every time you do a question or Synchronize data every time you change it (see codeshelper , which is automatically saved when writing answers), there is no problem, and it can reduce the pressure on the database.
what to consider is that redis is at risk of losing data. What if redis fails or restarts during the exam

?
Menu