What's the best strategy to sync Redis data to MySQL?

前端 未结 3 727
我在风中等你
我在风中等你 2021-01-31 04:40
  1. The use case is to use Redis to be local cache of MySQL
  2. The data format in MySQL is: a single primary key and several other fields. There will not be queries cros
3条回答
  •  时光取名叫无心
    2021-01-31 05:01

    When you update values in Redis,you can put the values in other 'Queue', such as List in Redis.Then consuming the values in Queue and update Mysql.

    If the Redis data isn't too much,just using a Scheduler to batch flush all data to Mysql.

提交回复
热议问题