Pregunta de entrevista de ByteDance

How to ensure Consistency between Redis and Database?