All jobs / Backend developer / Distributed Systems

Backend developer interview question · 5+ years

The interviewer asks: “We're adding a search index. Can the API write DB and Elasticsearch in one request?” Strongest answer?

The strongest answer

That's a dual write — one will fail. I commit to the database (and outbox) and let a consumer update search, or I use change-data-capture. I don't require both commits in the request.

Why it works

Exactly. Search is a derived view. The system of record commits first; search catches up. Idempotent upserts handle the lag.

What a good answer covers

Answers that fall short

Who gets asked this

More Distributed Systems questions