vishal patel
Knowledge hub

Architecture, explained the way I use it.

My working notes as an architect. Every topic follows the same template: problem → diagram → how it works → when to use / avoid → trade-offs → where I've applied it → curated sources (videos, courses, docs, books).

Status legend: Applied in production Understood LearningVisual cheatsheets ↓Browse all sources →
43 topics
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
Design PrinciplesApplied in production

SOLID Principles

Five object-oriented design principles that keep code open to change — single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion.

Foundation4 sources
Design PrinciplesApplied in production

KISS, DRY, YAGNI & Rule of Three

The pragmatic trio — keep it simple, don't repeat knowledge, don't build what you don't need yet — and when each one actually applies.

Foundation4 sources
Design PrinciplesApplied in production

Coupling, Cohesion & Separation of Concerns

High cohesion inside a module, loose coupling between modules — the single most important property of a maintainable architecture.

Foundation4 sources
Design PrinciplesApplied in production

The Twelve-Factor App

Twelve rules for building cloud-native services that are portable, scalable and deployable anywhere — config in env, stateless processes, logs as streams.

Foundation3 sources
Design PrinciplesApplied in production

Idempotency

Doing an operation twice has the same effect as doing it once. The foundation of safe retries, at-least-once messaging and reliable APIs.

Intermediate4 sources
Design PrinciplesApplied in production

API Evolution & Backward Compatibility

Change APIs without breaking clients — additive changes, tolerant readers, versioning strategy and explicit compatibility boundaries.

Intermediate4 sources
Design PrinciplesApplied in production

Architecture Decision Records (ADRs) & Trade-off Thinking

Capture each significant decision — context, options, decision, consequences — so the "why" survives people leaving. Plus how to reason about trade-offs.

Foundation4 sources
System DesignUnderstood

How to Approach Any System Design

A repeatable framework — requirements, estimates, API, data model, high-level design, deep dives, trade-offs — plus the numbers every architect should know.

Foundation7 sources
System DesignUnderstood

Design: URL Shortener

The classic warm-up — ID generation, read-heavy caching, redirects at scale and analytics without slowing the hot path.

Foundation3 sources
System DesignUnderstood

Design: Distributed Rate Limiter

Protect APIs and tenants — algorithms (token bucket, sliding window), distributed counters in Redis, and where to enforce limits.

Intermediate4 sources
System DesignUnderstood

Design: Notification System

Send email, SMS, push and webhooks at scale — fan-out, user preferences, retries, dedupe and provider failover.

Intermediate3 sources
System DesignLearning

Design: Real-time Chat

WebSockets at scale — connection gateways, message fan-out, ordering, delivery receipts, presence and offline sync.

Advanced3 sources
System DesignApplied in production

Design: Headless CMS with Branches & Releases

My speciality — a multi-tenant content platform with Git-like branches, scheduled releases, multi-locale publishing and per-item job status.

Advanced4 sources
Distributed Systems & DataUnderstood

CAP & PACELC Theorems

During a network partition you choose consistency or availability; when there's no partition you still trade latency against consistency.

Intermediate5 sources
Distributed Systems & DataLearning

Consistency Models

From linearizable to eventual — what each guarantee means for users, and practical models like read-your-writes and monotonic reads.

Advanced4 sources
Distributed Systems & DataUnderstood

Replication

Keep copies of data on multiple nodes for availability, durability and read scaling — single-leader, multi-leader and leaderless, sync vs async.

Intermediate4 sources
Distributed Systems & DataUnderstood

Sharding & Partitioning

Split data across nodes so storage and throughput scale horizontally — choosing shard keys, range vs hash, hot spots and rebalancing.

Advanced5 sources
Distributed Systems & DataApplied in production

Caching Strategies

Cache-aside, read/write-through, write-behind; TTLs, invalidation, stampede protection and multi-layer caches (browser → CDN → app → DB).

Intermediate4 sources
Distributed Systems & DataUnderstood

Message Queues vs Event Streams

RabbitMQ/SQS-style queues distribute work; Kafka-style logs retain ordered events for many consumers and replay. Know which one your problem needs.

Intermediate5 sources
Distributed Systems & DataApplied in production

MongoDB at Enterprise Scale

Data modelling by access pattern, indexing (ESR rule), transactions, change streams and the operational gotchas of large multi-tenant collections.

Advanced5 sources
Cloud & DeliveryUnderstood

CI/CD & GitOps

From commit to Kubernetes — build once, promote the same artefact, and let Git be the source of truth for what's running (ArgoCD).

Intermediate5 sources
Cloud & DeliveryLearning

Kubernetes Essentials for Architects

The objects that matter — Deployment, Service, Ingress, ConfigMap/Secret, HPA — and the settings that decide reliability (probes, requests/limits, PDBs).

Intermediate4 sources
Cloud & DeliveryUnderstood

Observability — Logs, Metrics, Traces

Know what your system is doing in production — the three pillars, OpenTelemetry, SLIs/SLOs, and alerting on symptoms not causes.

Intermediate4 sources
Cloud & DeliveryLearning

AWS Well-Architected Framework

Six pillars for reviewing any cloud architecture — operational excellence, security, reliability, performance efficiency, cost optimisation, sustainability.

Foundation5 sources
AI EngineeringApplied in production

RAG (Retrieval-Augmented Generation) Architecture

Ground LLM answers in your own data — ingestion, chunking, embeddings, vector search, reranking, prompting with citations, and evaluation.

Intermediate5 sources
AI EngineeringLearning

AI Agents & Tool Use

LLMs that plan and act through tools in a loop — workflows vs agents, the agent loop, guardrails, and when not to build an agent.

Advanced4 sources
AI EngineeringLearning

Model Context Protocol (MCP)

An open protocol that standardises how AI apps connect to tools and data — build a server once, use it from any MCP-capable client.

Intermediate5 sources
AI EngineeringLearning

LLM Evaluation (Evals)

Test AI features like software — golden datasets, code-based and LLM-as-judge graders, regression gates in CI, and production monitoring.

Intermediate4 sources
// 19 one-page summaries

Visual cheatsheets

One-page visual notes I made while studying: architecture, trade-offs, examples and interview questions for each topic.