ByteDance Interview Question

How to ensure Consistency between Redis and Database?