Search on disk
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 8 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    How much segment churn do Bazaar’s price and stock changes create?

      What does merging that churn cost in disk writes?

        A query needs 200 uncached pages, read one after another. How long?

          Build-up · 6 steps

          Follow one price change into a shard

          Watch P-48213’s new price become acknowledged, then searchable, then safe on its own, and see where the old ₹499 copy goes.

          Step 1 of 6

          Into the buffer

          The indexer sends the new price. Lucene analyses the document into an in-memory buffer, which Elasticsearch shares across active shards at 10% of the heap. Nothing can find it yet.

          4 interview moments

          You’re the candidate

          The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

          1. Deep dive 1 of 4

            Interviewer

            “One cluster holds Bazaar’s product index and its app logs. Indexing feels slow. Which translog durability do you pick?”

            Sellers are told their new price is saved. The logs can be re-sent from where they came from.

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “Bazaar sees 30 million price and stock changes a day, 5,000 a second in a sale. How do you index them?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “Bazaar’s live product index has many segments and plenty of deleted documents. A teammate proposes a nightly force merge to one segment. Do it?”

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “A seller saves a new price, then searches their shop and still sees the old one. How do you fix it?”

            Your move. Pick an approach: