Tenant routing
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 big is the tenant map, and what does a lookup cost?

      How long would 400 sign-ups take with a certificate each?

        How long to onboard 10,000 custom domains?

          Build-up · 6 steps

          Follow one request to Acme’s shard

          One browser request for acme.app.example, from DNS to the database. Each hop needs only part of the answer.

          Step 1 of 6

          DNS: one wildcard record

          One record, *.app.example, sends every tenant name to your edge. DNS knows nothing about tenants, so signing up kirana.app.example is just a catalog row.

          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

            “Your SaaS has 200,000 tenants, many API integrations, and moves tenants between stamps often. How do requests reach the right stamp?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “Sale day: 80,000 requests a second across 200,000 tenants. How does each router find a tenant’s stamp?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “A customer brings 10,000 storefront domains to point at your platform. How do you get each one a certificate?”

            Your move. Pick an approach: