Tenants
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 · 6 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.

    Label one request counter by tenant. How many time series?

      How much does storing tenant IDs as text cost over 1 billion rows?

        Build-up · 5 steps

        Follow one request’s tenant from token to row

        A user of tenant t_7f3a places an order. Watch where its tenant ID comes from, and everywhere it goes.

        Step 1 of 5

        Sign in for one tenant

        The user authenticates, and someone with several tenants picks one. The token is issued for that tenant with a tenant claim, so no request is ever ambiguous.

        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

          “A user in tenant B edits one header and reads tenant A’s invoice 1042. What’s your fix?”

          The invoices API takes the tenant from the X-Tenant-Id header and queries WHERE id = 1042, with no tenant filter.

          Your move. Pick an approach:

        2. Deep dive 2 of 4

          Interviewer

          “You’re launching a consumer music app, and every subscriber is one person today. Do you model a tenant?”

          Your move. Pick an approach:

        3. Deep dive 3 of 4

          Interviewer

          “Each tenant picks a subdomain like acme-retail at sign-up. Should it be the key in your tables and object paths?”

          Your move. Pick an approach:

        4. Deep dive 4 of 4

          Interviewer

          “A tenant’s payment fails. What does the platform do with its data, logins and jobs?”

          Your move. Pick an approach: