Domanda di colloquio di ByteDance

How to ensure Consistency between Redis and Database?