InterviewKata
Software architecture · Revise in 10 minutes

Cheat sheet: Software architecture

Every module and case study on one page: its memory hook and the points worth saying out loud. Print it (Ctrl/⌘ P) and re-read it before a practice session; open the page behind any card when something doesn't come back to you. Built automatically from the pages, so it always matches them.

Level 0 · The architect

01

What software architecture is

“Load-bearing walls, with a note taped on”

Architecture is the parts that everything else rests on, and the note says why each wall is there.

Avoid
  • Architecture as a technology list
  • Splitting code but not data
  • No recorded reasons
02

The architect's role

“Wide, not deep; near the code, not in its way”

Know a little about a lot, stay close to the code, and never be the thing the team waits for.

Avoid
  • Owning critical-path code
  • The ivory tower
  • Recommending what you know
03

Negotiating, presenting and leading

“Translate, divide, demonstrate”

Turn demands into costs, split them into the parts that need them, and let evidence settle disputes.

Avoid
  • Accepting buzzwords as requirements
  • The rule without the reason
  • The control freak and the armchair architect

Level 1 · Architecture characteristics

04

Identifying architecture characteristics

“Not a feature, shapes the structure, can't live without it”

The three tests every characteristic must pass. Then keep only the top three.

Avoid
  • Supporting everything
  • Confusing scalability with elasticity
  • Forgetting feasibility
05

Defining and measuring characteristics

“No number, no characteristic”

Every top characteristic gets a measure, a percentile or a rate, and a condition.

Avoid
  • Headroom for a burst
  • Averages as targets
  • Measuring only the servers
06

Trade-off analysis

“Weigh, don't count”

A scorecard counted out of context is precise and wrong. Weight every criterion by this system's needs.

Avoid
  • The out-of-context scorecard
  • Analysis paralysis
  • Only two options

Level 2 · Structure

07

Modularity, cohesion and coupling

“Things that change together, live together”

That's cohesion. And the more things lean on a part, the more stable and abstract it must be.

Avoid
  • The shared kernel of everything
  • Train-wreck calls
  • Splitting by technical type
07a

Inside a service: SOLID, patterns, hexagonal

“Plugs point in”

Business rules own the sockets; every database, vendor and test is a plug that points inwards.

Avoid
  • Ports shaped like the vendor
  • Interfaces everywhere
  • The anemic domain
08

Finding the components

“Name components after verbs, not nouns”

Enrolment, checkout, publishing: things the system does. Not Student, Course, Payment: things it stores.

Avoid
  • The entity trap
  • Code in parent namespaces
  • One giant "core" component
08a

Domain-Driven Design: strategic design

“Where the word changes, the border goes”

Draw a bounded context wherever the same word starts to mean something different, and translate at the border.

Avoid
  • Contexts per entity
  • DDD tactics without strategy
  • The accidental conformist
08b

Domain-Driven Design: tactical design

“One box, one key, numbers for the rest”

An aggregate is changed in one transaction through its root; everything outside it is referenced by ID and updated by events.

Avoid
  • Aggregates as table joins
  • Bypassing the root
  • Calling slow systems inside the transaction
09

Architecture quantum and the domain

“Shared pipes, one house”

Share a database or wait on a call, and two services become one quantum.

Avoid
  • The distributed monolith
  • Synchronous calls across different characteristics
  • One enterprise-wide model
09a

Teams and architecture

“The kitchen shapes the dish”

The way teams are split and talk is the way the system will be split and talk; design both together.

Avoid
  • Microservices without the teams
  • Shared ownership
  • Permanent collaboration

Level 3 · Architecture styles

10

Monolithic vs distributed

“Every arrow is a phone call”

In a distributed design, each arrow can be slow, fail, be overheard or reach the wrong place. Price every one.

Avoid
  • Retries without idempotency
  • Chatty calls across the network
  • Hard-coded addresses
11

Layered and modular monolith

“Floors or shops”

Layers split by technical job (floors of a department store); modules split by business area (shops in a centre). Both share one building.

Avoid
  • Unenforced boundaries
  • Ignoring the sinkhole
  • Shared tables everywhere
12

Microkernel

“Console and cartridges”

A stable console, a standard slot, and games that come and go without opening the box.

Avoid
  • A contract that leaks
  • Plug-ins depending on plug-ins
  • No isolation
13

Service-based and SOA

“Few big departments, one records room”

Service-based: a handful of independent departments sharing one set of records. Reuse everything, and you get SOA's tangle.

Avoid
  • One entity library for everything
  • Services calling services
  • Too many services
14

Event-driven architecture

“Shout what happened, don't say what to do”

Events are past-tense facts broadcast to whoever cares. Commands go to one receiver.

Avoid
  • No error strategy
  • Anemic events
  • The swarm of gnats
15

Space-based architecture and caching

“A fridge at every bar”

Each unit serves from its own memory and tells the others what changed; the storeroom catches up later.

Avoid
  • Ignoring collisions
  • Unbounded data in memory
  • Forgetting the pump
16

Microservices

“Own your stock, use the front door”

Every service owns its data; everyone else comes in through its API or listens to its events.

Avoid
  • The distributed monolith
  • Too fine, too early
  • Business logic in shared libraries
16a

Pipeline and serverless

“Stations in a line, machines on demand”

A pipeline is independent stations joined one way; serverless switches the machines on only when a car arrives.

Avoid
  • Unbounded fan-out into a fixed resource
  • Functions calling functions synchronously
  • A pipeline with hidden side doors
17

Choosing and combining styles

“Characteristics choose, constraints veto”

The top characteristics shortlist the styles; team, budget and domain rule some out.

Avoid
  • Style first, characteristics later
  • Ignoring team capacity
  • The big-bang rewrite
17a

Frontend architecture: micro-frontends, BFF and rendering

“One storefront, many departments”

Customers see one shop; teams own their own departments, each with its own stockroom (BFF).

Avoid
  • Micro-frontends as a fashion
  • Horizontal splits
  • Shared global state

Level 4 · Communication and integration

18

Integration styles

“Post, cabinet, phone, in-tray”

The four ways offices share information, and the four integration styles: file, shared database, RPC, messaging.

Avoid
  • Integrating through another system's tables
  • Non-idempotent file imports
  • Synchronous calls to unreliable partners
19

Synchronous vs asynchronous

“Wait only for what you need to show”

If the next screen needs the answer, wait for it. Everything else is a note left for later.

Avoid
  • Synchronous chains
  • Replies without correlation IDs
  • Aggressive polling
20

Messaging patterns

“Hand in, store, deliver: guard all three”

A message can be lost at each step. Confirm the send, persist the store, acknowledge after the work.

Avoid
  • Acknowledge, then process
  • Global ordering by accident
  • Poison messages
21

Orchestration and choreography

“Conductor or dance floor”

A conductor knows the score and stops the music on a mistake; a dance floor scales but nobody sees the whole room.

Avoid
  • No failure design
  • The god orchestrator
  • Hidden choreography
22

Resilience and observability

“Trip the breaker, label the fuse box”

Contain failures with breakers, timeouts and bulkheads; make them findable with logs, metrics and traces.

Avoid
  • No timeouts
  • Retry storms
  • One shared pool
22a

Cloud-native architecture and cost

“Any taxi, meter running”

Build so any instance can be replaced at any moment, and design knowing the meter is always on.

Avoid
  • Lift and shift, then surprise
  • Optimising before measuring
  • Ignoring data transfer
22b

AI and LLM components in an architecture

“Gate it, ground it, guard it, grade it”

A gateway in front, retrieval for facts, guardrails around, evals to measure.

Avoid
  • No evals
  • Provider SDKs everywhere
  • Retrieval that ignores permissions

Level 5 · Data and transactions

23

Data in distributed architectures

“One writer, many readers, never through the back door”

Every table has one owner that writes it. Everyone else reads through its API, its events, or a copy built from them.

Avoid
  • Reporting through the back door
  • CQRS everywhere
  • Lazy migration with no end
23a

Analytical data architecture

“Food hall, not central kitchen”

Each domain cooks and serves its own data as a product; the hall provides the kitchen equipment and enforces the hygiene rules.

Avoid
  • The data swamp
  • Pipelines that read private tables
  • Mesh as a reorganisation
24

Distributed transactions and sagas

“Book, book, fail, cancel, cancel”

A saga moves forward one commit at a time, and on failure walks back, undoing each in reverse.

Avoid
  • Irreversible steps first
  • Non-idempotent compensations
  • No home for stuck sagas
25

Contracts and versioning

“Add, don't change; read only what you need”

Producers add; consumers tolerate. Everything else needs expand and contract or a new version.

Avoid
  • In-place breaking changes
  • Strict consumers of growing contracts
  • Version sprawl

Level 6 · Governance and evolution

26

Fitness functions and governance

“If it isn't checked, it isn't true”

Every important architecture decision gets an automated check, or it will quietly stop being true.

Avoid
  • Rules without checks
  • Flaky fitness functions
  • Only triggered checks
27

Architecture decisions and ADRs

“Write down the why, and the price”

Every significant decision gets its reasons and its costs recorded where the next person will look.

Avoid
  • Only the outcome
  • One-sided consequences
  • No compliance
28

Assessing architecture risk

“Score alone, argue together”

Rate risks individually, then let the disagreements lead the conversation.

Avoid
  • Ignoring unknowns
  • Group anchoring
  • Lists without decisions
28a

Security architecture

“Badge at every door”

Every request proves who it is and what it may do, every time, wherever it comes from.

Avoid
  • Trusting the internal network
  • Shared credentials
  • Security as the last review
29

Analysing an existing architecture

“Survey the house, not the brochure”

Measure the code and its history; the diagram is what someone hoped the system would be.

Avoid
  • Analysing only the present
  • Metrics as targets
  • Refactoring cold code
29a

Managing technical debt

“Borrow on purpose, repay where you walk”

Take debt deliberately and write it down; pay it back in the code you change most, where the interest is highest.

Avoid
  • Debt as a synonym for "code I don't like"
  • The once-a-year clean-up
  • Hiding the shortcut
30

Migration, refactoring and roadmaps

“One floor at a time, hotel stays open”

Migrate in slices behind a routing layer, each slice in production before the next begins.

Avoid
  • The elephant migration
  • Technical justification only
  • Forgetting to finish
31

Architecture antipatterns

“Name it to notice it”

Antipatterns hide because each step feels reasonable. A name lets the team see the pattern.

Avoid
  • No decisions at all
  • Pattern collecting
  • Scars as rules
32

Diagramming and documenting

“Title, key, labels, one zoom level”

Four checks before any diagram leaves your hands.

Avoid
  • Unlabelled arrows
  • Mixed levels
  • No key

Level 7 · Enterprise

33

Enterprise architecture

“Plan the roads, not the houses”

Enterprise architects decide what connects systems and what must be common; teams design inside.

Avoid
  • Modelling before acting
  • Standards without reasons
  • Ignoring interfaces
33a

Technology strategy and economics

“Build your edge, buy the rest”

Spend engineers only on what makes the business different; buy products and rent commodities for everything else, and look again as the market moves.

Avoid
  • Building commodities
  • First-year thinking
  • Portability everywhere
33b

From senior engineer to architect

“Write it, pre-wire it, ride the elevator”

Put the reasoning in a document, win the key people one at a time before the meeting, and translate the decision for every floor, up and down.

Avoid
  • Still the best coder on the team
  • Surprising people in meetings
  • One language for everyone

Case studies

C01

An ADR that avoided a lock-in trap

Lessons
  • Lock-in hides in features, not only in APIs
  • The advice process found what the authors couldn't
  • Write the drivers down
  • Must-haves are knockouts, not weights
C02

Replacing a review board that slowed everyone down

Lessons
  • Review early and with context, or not at all
  • Seek advice, not permission
  • Tier by reversibility and reach
  • Make "who is affected" findable
C03

Spotify: Backstage and golden paths

Lessons
  • Platforms reduce cognitive load
  • Make the right thing the easy thing
  • A catalogue with owners is governance infrastructure
  • Golden State is a fitness function for drift
C04

From zero to a million users: one startup's cloud bill

Lessons
  • Project the bill in the design doc
  • Tag from day one
  • Runaway costs are architecture-shaped
  • Count the people before leaving serverless
C05

Prime Video: from serverless to one process

Lessons
  • Logical and physical architecture are separate decisions
  • Distribution has a price per hop
  • Per-operation pricing scales with chattiness, not with value
  • It's one service, not a verdict
C06

37signals leaves the cloud

Lessons
  • Elasticity is a characteristic you pay for
  • Capex against opex
  • The facts made it work
  • Commitments delay savings
C07

Segment: back from microservices

Lessons
  • Solve the real problem at the right level
  • Shared libraries across services are a hidden monolith
  • Granularity has a cost per service
  • The enabler was a test suite, not an architecture
C08

Shopify: the modular monolith

Lessons
  • Modularity and distribution are separate decisions
  • Organise by domain, not by technical layer
  • A boundary that isn't checked isn't a boundary
  • Watch the dependency graph, not just the interfaces
C09

Uber: domain-oriented microservices

Lessons
  • Bounded contexts above services
  • Give dependencies a direction
  • Extension points beat shared code edits
  • Interfaces absorb churn
C10

GitLab's 2017 database outage

Lessons
  • A backup you haven't restored is a hope
  • Replicas are not backups
  • Failure alerts need a channel that works
  • Ownership is architecture
C11

Netflix: active-active across regions

Lessons
  • Active-active is a data decision first
  • No cross-region calls on the user's path
  • Failover you don't exercise doesn't work
  • RTO is the sum of the slowest steps
C12

Health data across India and the US

Lessons
  • Find where each requirement really comes from
  • Data stays, access travels
  • Disaster recovery has a country too
  • Cells limit the blast radius of everything