Elasticsearch
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 · 7 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 many primary shards does dish search need?

      How many shard copies does the dinner peak need?

        An IPL final’s innings break triples traffic. How many copies, and when?

          Build-up · 6 steps

          Feed the index, read the truth

          Follow one menu change into the dish index, then one “biryani” search back out. Nothing writes to Elasticsearch except the indexer.

          Step 1 of 6

          Write to the database only

          The menu service writes Postgres, the source of truth, and never calls Elasticsearch. Dual writes can crash between the two stores, and two concurrent updates can reach the index in the wrong order.

          3 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 3

            Interviewer

            “A food app searches dishes near the user. Restaurants have about 60 dishes each. How do you model them?”

            Your move. Pick an approach:

          2. Deep dive 2 of 3

            Interviewer

            “As users type, the app shows dishes from open restaurants nearby. Someone types “tikka pa”. Which typeahead do you build?”

            Your move. Pick an approach:

          3. Deep dive 3 of 3

            Interviewer

            “Your B2B SaaS has 50,000 tenants, and each searches only its own documents. How do you lay out the indices?”

            Your move. Pick an approach: