Architecture Interview Guide

Question → what it tests → strong answer → green flags → red flags → follow-up. The goal is judgment: does the candidate ask what problem the architecture solves, name the tradeoff, and know how it fails?

FundamentalsBeginner
What is software architecture?
Define software architecture in your own words. What is in it, what is not, and how would you tell whether a system has good architecture?
FundamentalsBeginner
Code architecture vs system architecture
What is the difference between code architecture and system architecture? Can one be good while the other is bad? Give an example of each direction.
FundamentalsIntermediate
Why did you add that box?
A candidate draws a load balancer, a cache, a queue and a CDN before writing down a single number. How should each of those be justified? Walk me through a system that grows from browser → backend → database, adding components only when a measured problem appears.
ApplicationIntermediate
When should you use microservices?
A team of eight engineers runs a monolith with 2,000 requests per second and wants to move to microservices. What would you ask them, and when is the move justified?
ApplicationBeginner
Is a monolith bad architecture?
Defend or attack the statement "a monolith is bad architecture". How does a monolith scale, and where is its real ceiling?
ApplicationIntermediate
How do you enforce boundaries in a modular monolith?
A modular monolith is only modular if the boundaries hold. What mechanisms actually keep the Order module from reaching into the Payment module's tables, and how does that prepare a later extraction?
ApplicationExpert
How do you draw service boundaries?
You are splitting a system into services. What makes a boundary good, what makes it bad, and how would you find the right one for orders, inventory and payments?
ApplicationAdvanced
Database per service: rule or guideline?
Why do microservices insist on a database per service? What do you lose, and how do you answer a question that needs data from two services?
CodeIntermediate
Layered vs hexagonal architecture
Compare layered architecture with hexagonal (ports and adapters). What problem does hexagonal solve that layers do not, and when is the difference not worth the extra structure?
CodeIntermediate
Why does the Dependency Rule point inward?
Clean Architecture says source code dependencies must point inward, toward the domain. Why that direction? What goes wrong when it is broken, and how do you enforce it?
CodeAdvanced
When is there too much abstraction?
How do you recognise that a codebase has more abstraction than it needs, and how do you decide what to remove?
MessagingBeginner
Events vs commands
What is the difference between an event and a command, and why does it matter which one you send between services?
MessagingExpert
Can you deliver a message exactly once?
A product manager asks for "exactly-once" processing of payment events. Is that possible? What do you actually build?
MessagingIntermediate
How do you keep events in order?
Consumers sometimes see `OrderUpdated` before `OrderCreated`. Why does that happen in a partitioned log, and how do you choose a partition key?
MessagingIntermediate
Queue vs pub/sub vs log
When would you choose a work queue, a pub/sub topic, or a Kafka-style log? What does each guarantee about who receives a message and for how long?
MessagingIntermediate
Should this call be synchronous or asynchronous?
How do you decide whether an interaction between two services should be a synchronous request or an asynchronous message? Give the failure modes of both.
APIsIntermediate
REST or GraphQL?
When would you choose GraphQL over REST for an API, and what does GraphQL make harder?
APIsAdvanced
Why gRPC for internal services?
Teams often use gRPC between internal services and REST at the edge. What does gRPC buy internally, what does it cost, and why not expose it to browsers?
APIsAdvanced
WebSockets, SSE or polling?
A dashboard needs live updates. Compare polling, long polling, server-sent events and WebSockets. What does each cost at 100,000 connected clients?
APIsIntermediate
What belongs in an API gateway?
What should an API gateway do, what must it never do, and how do you stop it from becoming the new monolith?
APIsIntermediate
How do you version an API?
You need to change a public API in a way that breaks existing clients. How do you version it, how long do you support old versions, and how do you avoid needing a new version at all?
ScalingBeginner
Why must services be stateless to scale?
Why does horizontal scaling require stateless services? What state is unavoidable, and how do you handle it?
ScalingIntermediate
Which load-balancing algorithm, and why?
Compare round robin, least connections and consistent hashing. When does each fail, and what do health checks get wrong?
ScalingExpert
How do you invalidate a cache?
Design the invalidation strategy for a product catalogue cache in front of Postgres. Cover TTL, explicit invalidation, stampedes and what "stale" is allowed to mean.
ScalingBeginner
What belongs on a CDN?
What should you put on a CDN, what should you not, and how do you invalidate it? Include the numbers that justify a CDN in the first place.
ScalingExpert
The site is slow. What is your first step?
A single-server app with one Postgres database is slowing down as traffic grows. Walk me through what you do first, second and third, and what evidence moves you from one step to the next.
AsyncIntermediate
The client retried POST /payment. Did we charge twice?
A mobile client calls `POST /payments`, the gateway times out after 30 s, and the client retries. How do you guarantee the customer is charged once?
AsyncBeginner
How should a background job retry?
An email-sending worker fails on a transient SMTP error. Describe a retry policy, and what happens to a job that never succeeds.
AsyncAdvanced
Producers write 100k/s, consumers handle 20k/s. Now what?
A pipeline ingests 100,000 events per second but the consumers process 20,000. The queue grows. What are your options and how do you choose?
DataIntermediate
Order, Payment and Inventory are separate services. How do you keep them consistent?
Placing an order must create the order, charge the card and reserve stock across three services with their own databases. How do you make that consistent?
DataAdvanced
Payment failed after inventory was reserved. Walk me through the compensation.
In an order saga, the payment step fails after inventory has been reserved. What runs, what state does the user see, and what can go wrong during compensation itself?
DataIntermediate
When would you actually use CQRS?
A team wants to introduce CQRS for their SaaS product. What problem must exist for that to be a good decision, and what will it cost them?
DataExpert
What do you gain and lose by storing events instead of state?
A bank-ledger team stores `AccountOpened +100`, `PaymentMade −20`, `RefundReceived +20` and replays them for the balance. What does this buy them, what does it cost, and where would you not do it?
ReliabilityAdvanced
How can retries make an outage worse?
A payment provider slows down. Ten minutes later it is completely down and so is your checkout. Your services all retry on failure. Explain what happened and how to retry safely.
ReliabilityBeginner
Explain the states of a circuit breaker
Walk me through Closed, Open and Half-Open. What triggers each transition, and what should the caller do while the breaker is open?
ReliabilityIntermediate
Which rate-limiting algorithm, and where do you enforce it?
You need to limit an API to 100 requests per minute per client. Compare fixed window, sliding window and token bucket, pick one, and explain how it works across 20 gateway instances.
ReliabilityAdvanced
Define an SLO for this service and explain the error budget
You own a checkout API. Define SLIs and an SLO, compute the error budget, and explain how the budget changes what the team does.
ReliabilityBeginner
What does 99.9% actually mean, and how does it compose?
How much downtime per year is 99.9%? If your service calls three dependencies that are each 99.9%, what availability can you promise?
DistributedIntermediate
Why consistent hashing instead of hash mod N?
You shard a cache across 10 nodes with `hash(key) mod 10`. You add an eleventh node. What happens, and how does consistent hashing fix it?
DistributedExpert
What does CAP mean for a system you actually run?
Explain CAP without the "pick two" slogan. For a multi-region user-profile store, what happens during a partition under each choice, and how do quorums fit in?
DistributedBeginner
How do services find each other when instances come and go?
Instances autoscale, get rescheduled and roll out several times a day. How does Service A find a healthy instance of Service B, and what goes wrong with stale information?
ObservabilityBeginner
Logs, metrics, traces: what does each answer that the others cannot?
Explain the difference between logs, metrics and traces, and for a "checkout is slow" incident, which one you would open first and why.
ObservabilityIntermediate
Here is a trace of a slow request. Read it to me.
A trace shows: Gateway 20 ms → User Service 35 ms → Order Service 180 ms, and inside Order Service a Database span of 140 ms. What do you conclude, what do you check next, and how did the trace id get from the gateway to the database span?
System DesignIntermediate
Design a URL shortener
Design a service like bit.ly. Walk me through requirements, scale, the API, the data model, and how the design evolves as traffic grows.
System DesignAdvanced
Design a notification system
Design a service that sends email, SMS and push notifications for the rest of the company. Cover the API, the pipeline, retries, rate limits, deduplication and how you know a notification was delivered.
System DesignExpert
Design chat with presence
Design real-time one-to-one and group chat with online/offline presence. Cover connections, message routing, ordering, delivery receipts, presence at scale, and offline users.