Pergunta de entrevista da empresa ByteDance

How to ensure Consistency between Redis and Database?