SpinTheMic
Pro

Interview practice question

Search index out of sync

System Design · Databases · Intermediate

Your app writes to the database and then to Elasticsearch. Sometimes the second write fails, and search results are wrong. How do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Dual writes are not atomic.
  • Use CDC from DB log.
  • Or transactional outbox.
  • Idempotent indexing.
  • Periodic reconciliation.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics