Architecture Patterns
General material on architectural patterns and their trade-offs.
3 to work through
-
intermediate
Design a URL shortener handling 100 million new links per month and 10 billion redirects. Where is the real difficulty?
2 min answer -
intermediate Multiple choice
Orders must trigger inventory reservation, a confirmation email, an analytics record and a fraud check. Queue, topic, or both — and what breaks if you choose wrong?
2 min answer -
advanced Multiple choice
Prime Video reported a 90% cost cut by consolidating a serverless distributed service into one process. Does that mean microservices were the wrong choice, and what is the actual decision rule?
2 min answer
15 terms in this topic
Backend for Frontend
A separate, narrow backend per client experience, which aggregates and reshapes downstream services for exactly that client's needs.
patternCell-Based Architecture
Partitioning a service into complete, independent copies of itself, each serving a subset of customers, so a failure is bounded to one cell.
patternCompeting Consumers
Multiple identical consumers reading from one queue, so throughput scales with consumer count and work is distributed automatically.
patternEvent-Driven Architecture
A style in which components communicate by emitting and reacting to facts about what happened, rather than by calling each other.
patternHexagonal Architecture
Putting the domain at the centre and letting everything external — UI, database, queues — attach through ports implemented by replaceable adapters.
patternLayered Architecture
Organising code into horizontal layers — presentation, application, domain, data — where each layer may only call the one beneath it.
patternModular Monolith
A single deployable unit internally partitioned into modules with enforced boundaries, explicit interfaces and no shared internal state.
patternOutbox Pattern
Writing an outgoing message into a table in the same transaction as the business change, and relaying it to the broker separately, so the two cannot …
patternPipes and Filters
Decomposing processing into independent steps connected by channels, each transforming its input and passing it on.
case-studyPrime Video's Move Back to a Monolith
Amazon Prime Video consolidated a serverless, distributed audio/video monitoring service into a single process and reported a 90% cost reduction — th…
patternPublish/Subscribe
A messaging pattern where each published message is delivered to every interested subscriber, rather than to one competing worker.
toolService Mesh
An infrastructure layer of sidecar proxies that handles service-to-service networking — mTLS, retries, timeouts, routing, telemetry — outside the app…
case-studyShopify's Pods and Modular Monolith
Shopify handles Black Friday scale with isolated pods — complete stacks each serving a subset of merchants — while keeping the application itself a d…
patternSidecar
Deploying a helper process alongside the main application in the same unit, to supply cross-cutting behaviour without changing the application.
patternStrangler Fig
Replacing a legacy system incrementally by routing individual capabilities to new implementations behind a facade, until nothing routes to the old system.
Neighbouring topics
Layered Architecture
The default shape, its clarity, and where a technical partition fails.
No content yetEvent-Driven Architecture
Publishing facts, and trading comprehensibility for decoupling.
No content yetPipes and Filters
Independent transformation steps composed into a pipeline.
No content yetPublish/Subscribe
Broadcast to every subscriber, as distinct from work distribution.
No content yetCompeting Consumers
Scaling throughput with instances, at the cost of ordering.
No content yetSaga
Local transactions with compensating actions across services.
No content yetCQRS
Separate models for writing and reading, each optimised for its job.
No content yetEvent Sourcing
The event log as the system of record, with state as a projection.
No content yetOutbox
Making the event atomic with the business write it describes.
No content yetStrangler Fig
Incremental replacement behind a routing facade.
No content yetAnti-Corruption Layer
Translating a foreign model at the boundary so it does not leak in.
No content yetSidecar & Ambassador
Cross-cutting behaviour in a co-deployed process.
No content yetService Mesh
Sidecars applied estate-wide, and the scale at which that pays.
No content yetAPI Gateway
A single entry point for policy, routing and protocol translation.
No content yetBackend for Frontend
A narrow backend per client experience, owned by that client's team.
No content yetCell-Based Architecture
Complete isolated copies each serving a subset of customers.
No content yetSharding Patterns
Directory versus embedded keys, logical shards and rebalancing.
No content yetMaterialized Views
Precomputed query results, refreshed incrementally or in full.
No content yetOrchestration vs Choreography
A coordinator that knows the flow, or services that react to events.
No content yet