Monolith vs services
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.

    Ten services in a row, each 99.9% up. How much failure a month?

      Search traffic goes 10× on sale day. Does splitting it out save CPU?

        How many possible conversations do 8, 50 and 150 people have?

          Build-up · 6 steps

          Split one module out, the safe way

          A checkout monolith, Orders, Stock and Payments, goes from tangle to “a modular monolith plus one service”, a valid end state. Watch what each move buys and costs.

          Step 1 of 6

          One deployable, no seams

          Orders, Stock and Payments build and deploy as one unit over one database. Calls cost nanoseconds and checkout is one transaction, but any module can reach into another, so every change ripples everywhere.

          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

            “You’re building a new food delivery app with one team. How do you structure it?”

            Your move. Pick an approach:

          2. Deep dive 2 of 4

            Interviewer

            “Your team moved the payments code into its own service, but it still reads and writes the monolith’s tables. Ship it as is?”

            Your move. Pick an approach:

          3. Deep dive 3 of 4

            Interviewer

            “Each of your 140+ event destinations has its own service, queue and repo. Three engineers spend most of their time keeping it alive. Now what?”

            You split them so one slow destination couldn’t delay everyone on a shared queue.

            Your move. Pick an approach:

          4. Deep dive 4 of 4

            Interviewer

            “Your checkout request calls ten services one after another, each 99.9% available, failing independently. What do you change?”

            Your move. Pick an approach: