System Design · Senior · Question 35 of 75

Why is the search index often updated asynchronously rather than in the same transaction?

Explanation

Changes are fed into the index via a queue or CDC (change data capture). The main operation is fast and reliable, and search catches up within seconds - eventual consistency. The UI must be ready for this (e.g. show just-created items from local state).

Further reading

Problem with a question

System Design · Senior · question 35

Test yourself

Take the System Design · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz