Backend architecture practice
45 min · Intermediate
Most backend architecture mistakes in interviews and projects fall into four groups: choosing an architecture by fashion, hiding state in one server, doing slow work inside the request and letting layers skip each other. Each one has a quick question that catches it.
Topics in this lesson
- Mistake 1: choosing microservices by fashion
- Mistake 2: hidden per-server state
- Mistake 3: slow work inside the request
- Mistake 4: layers that skip each other
Key points
- Pick the architecture from teams, scaling differences and ops skills, not from what big companies use.
- If the next request can land on another server, all state must be in a shared store or a signed token.
- Keep only what the user must wait for in the request; queue the rest with retries and idempotent consumers.
- Every call goes one layer down: controller → service → repository.
Interview questions this lesson answers
- Monolith vs microservices: which would you choose?
- What does stateless mean, and why does it matter?
- How do you decide whether work should go to a queue?
- What is a modular monolith?
- How would you find per-server state in an existing app?
- Why shouldn't a controller call a repository directly?
- What is an idempotent consumer?
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.