vishal patel
← Knowledge hub

Architecture Patterns

Structural and integration patterns — how systems are shaped and how parts talk.

Architecture PatternsApplied in production

Layered (N-Tier) Architecture

Split an application into horizontal layers — presentation, application, domain, data — where each layer only calls the one below it.

Foundation4 sources
Architecture PatternsUnderstood

Hexagonal Architecture (Ports & Adapters)

Put the business core at the centre and talk to the outside world — HTTP, DB, queues, third-party APIs — only through ports (interfaces) implemented by swappable adapters.

Intermediate4 sources
Architecture PatternsUnderstood

Clean Architecture

Concentric rings — entities, use cases, interface adapters, frameworks — with one rule: source-code dependencies only point inward.

Intermediate4 sources
Architecture PatternsUnderstood

Modular Monolith

One deployable unit, internally split into strongly bounded modules with explicit public APIs — microservice-style boundaries without the distributed-systems tax.

Intermediate4 sources
Architecture PatternsApplied in production

Microservices Architecture

Structure a system as independently deployable services, each owning a business capability and its data, communicating over the network.

Intermediate5 sources
Architecture PatternsApplied in production

Event-Driven Architecture

Services announce facts ("EntryPublished") and others react asynchronously — decoupling producers from consumers in time, space and knowledge.

Intermediate5 sources
Architecture PatternsUnderstood

CQRS (Command Query Responsibility Segregation)

Use one model to change data (commands) and a different, optimised model to read it (queries) — often kept in sync by events.

Advanced4 sources
Architecture PatternsLearning

Event Sourcing

Store every state change as an immutable event; current state is derived by replaying events. The log is the source of truth.

Advanced4 sources
Architecture PatternsUnderstood

Saga Pattern

Keep data consistent across services without distributed transactions — a sequence of local transactions, each with a compensating action if a later step fails.

Advanced5 sources
Architecture PatternsUnderstood

Transactional Outbox

Write the business change and the outgoing event in the same local transaction, then relay the event to the broker — no more "saved to DB but message lost".

Advanced4 sources
Architecture PatternsApplied in production

Strangler Fig Migration

Replace a legacy system incrementally — route traffic slice by slice to the new system behind a facade until the old one can be switched off.

Intermediate5 sources
Architecture PatternsUnderstood

API Gateway & Backend-for-Frontend (BFF)

A single entry point that handles cross-cutting concerns (auth, rate limits, routing); BFFs go further with one tailored backend per client type.

Intermediate5 sources
Architecture PatternsUnderstood

Circuit Breaker, Retry, Timeout & Bulkhead

The resilience toolkit — fail fast, retry safely, bound waiting, and isolate resources so one slow dependency can't take down the whole system.

Intermediate6 sources
Architecture PatternsLearning

Sidecar & Service Mesh

Move networking concerns — mTLS, retries, traffic splitting, telemetry — out of application code into a proxy deployed next to every service.

Advanced4 sources
Architecture PatternsApplied in production

Multi-Tenant SaaS Architecture

Serve many customers from shared infrastructure while guaranteeing isolation of data, performance and configuration per tenant.

Advanced4 sources