Architecture Articles
Modular Monolith vs Microservices: Cost, Complexity and Team Size
Compare modular monoliths and microservices on cost, operational complexity, team size, delivery speed and reliability, with a decision checklist.
Migrating from a Modular Monolith to Microservices
When and how to extract a module into a microservice: signals that justify it, step-by-step extraction, data migration, strangler routing and pitfalls.
Building a Modular Monolith with NestJS
Use NestJS modules to build a real modular monolith: feature modules, exported providers as public APIs, events, per-module data access and boundary checks.
Building a Modular Monolith in Laravel: Structure and Practices
Structure a Laravel app as a modular monolith: module folders, service providers, routes and migrations per module, public APIs, events and deptrac enforceme...
Enforcing Module Boundaries with Architecture Tests
Keep a modular monolith modular: enforce boundaries in CI with deptrac, dependency-cruiser, ArchUnit, import-linter and Spring Modulith.
Data Ownership in a Modular Monolith: Schema per Module
Keep modules independent at the data layer: schema per module, no cross-module joins or foreign keys, read models and reporting.
Communication Between Modules: Public APIs, Events and Contracts
How modules in a modular monolith should talk: synchronous public interfaces, in-process events, DTOs, avoiding cycles and cross-module transactions.
Designing Module Boundaries with Domain-Driven Design
Find good module boundaries for a modular monolith using DDD: bounded contexts, ubiquitous language, event storming, context maps and signs a boundary is wro...
Modular Monolith Explained: The Middle Ground Between Monolith and Microservices
What a modular monolith is, how it differs from a classic monolith and microservices, its benefits, the rules that make it work, and when to choose it.
The Last Responsible Moment: Timing Architecture Decisions Well
Make architecture decisions at the last responsible moment: why deferring helps, the risk of waiting too long, and practical techniques.
Common Architecture Failure Patterns and the Lessons Behind Them
Recognise recurring architecture failures: distributed monolith, shared database, premature microservices, big-bang rewrites and missing observability.
Evolutionary Architecture and Fitness Functions
Evolutionary architecture explained: guided incremental change, and fitness functions that test architecture automatically in CI.
Technical Debt from Architecture Decisions: How It Accumulates and How to Pay It Down
How architectural technical debt differs from code debt, the debt quadrant, measuring it with change data, and strategies like strangler fig and debt budgets...
Architecture Decision Records (ADRs): How and Why to Write Them
Write Architecture Decision Records: what an ADR is, templates (Nygard, MADR), statuses, storage, examples and tooling.
One-Way vs Two-Way Door Decisions in Software Architecture
Classify architecture decisions by reversibility: analyse one-way doors carefully, make two-way doors fast, and learn to turn one into the other.
Why Architecture Decisions Matter: The Real Cost of Getting Them Wrong
Why early architecture decisions have outsized impact: cost of change, coupling, team speed and how to decide with less risk.
Architecture for Startups vs Enterprises: Matching Design to Stage
How architecture should differ by company stage: speed-first choices for startups, scale-ups adding boundaries and platforms, and enterprise governance.
Synchronous vs Asynchronous Communication Between Services
Compare synchronous REST/gRPC calls with asynchronous messaging and events: coupling, latency, failure handling, timeouts, retries, sagas and when to use eac...
Choosing a Database for Your Architecture: SQL, NoSQL and NewSQL
How to pick a database: relational vs document, key-value, wide-column, graph and search stores, NewSQL, polyglot persistence and questions to ask first.
Conway's Law and Team Topologies: How Teams Shape Architecture
Conway's Law says systems mirror the communication structure of the teams that build them. Learn the inverse Conway manoeuvre and team topologies.
Event-Driven Architecture: When to Use It and When Not To
What event-driven architecture is, event notification vs event-carried state vs event sourcing, brokers like Kafka, benefits, pitfalls and when to avoid it.
Layered vs Hexagonal vs Clean Architecture: What's the Difference?
Compare layered (n-tier), hexagonal (ports and adapters) and clean architecture: dependency direction, testability, folder structures and when each fits.
Monolith vs Microservices vs Serverless: A Decision Guide
Compare monoliths, modular monoliths, microservices and serverless on team size, scaling, cost, operations and consistency, with clear recommendations.
How to Choose the Right Software Architecture: A Practical Framework
A step-by-step framework for choosing a software architecture: drivers, quality attributes, team and domain, options, trade-off analysis and validation.
Presence and Last Seen at Scale: Designing Online Status for a Chat App
How online status, last seen and typing indicators work at scale: heartbeats, TTL keys in Redis, subscribing only to relevant contacts, and privacy controls.
Media Sharing in a Chat App: Uploads, Object Storage, CDN and Thumbnails
Design photo, video and document sharing for a chat app: pre-signed uploads, resumable transfers, encryption, thumbnails, CDN delivery, dedup and retention.
End-to-End Encryption in Chat Apps: Signal Protocol Basics
How end-to-end encrypted messaging works: identity keys, prekeys, X3DH key agreement, the Double Ratchet, forward secrecy, safety numbers and group sender ke...
Offline Messages and Push Notifications in a Chat System
How chat apps deliver to offline users: pending message queues, APNs and FCM push, collapsing notifications, multi-device sync and encrypted push payloads.
Storing Billions of Chat Messages: Data Model and Database Choice
Choose a database and schema for chat messages: Cassandra-style wide-column stores, partitioning by conversation, time buckets, inboxes and retention.
Designing Group Chat: Fan-Out on Write vs Fan-Out on Read
How group messaging scales: fan-out on write vs read, per-member inboxes, sender keys for encrypted groups, large groups and channels, and membership changes...
Message Delivery Guarantees in Chat Apps: Sent, Delivered and Read Receipts
How chat systems guarantee delivery: at-least-once with acknowledgements, idempotent client message IDs, per-conversation sequence numbers and receipt ticks.
Real-Time Messaging with WebSockets: Running Connection Servers at Scale
How chat apps keep millions of persistent connections: WebSocket gateways, heartbeats, load balancing, connection registries, reconnection and kernel tuning.
How to Design WhatsApp: Requirements and High-Level Architecture
System design of a WhatsApp-like chat app: requirements, scale estimates, WebSocket gateways, chat service, message store, presence and push notifications.
Documenting Requirements: SRS, PRD, Design Docs and ADRs
Which requirements document to write and when: PRD, SRS, technical design doc and Architecture Decision Records, with templates and tips to keep them alive.
Quality Attribute Trade-offs: Consistency vs Availability vs Latency
Why non-functional requirements conflict: CAP and PACELC, consistency vs latency, security vs usability, cost vs availability, and how to decide trade-offs.
Requirements in System Design Interviews: What to Ask First
Open a system design interview well: clarify scope, quantify non-functional requirements, estimate scale and state assumptions in the first 10 minutes.
Making Non-Functional Requirements Measurable: SLIs, SLOs and SLAs
Turn NFRs into SLIs, SLOs and SLAs. Learn the differences, how to choose good indicators, set targets, use error budgets and alert on burn rate.
Non-Functional Requirements Checklist: Performance, Availability, Security and More
A practical NFR checklist covering performance, scalability, availability, reliability, security, usability, maintainability, observability and cost.
How to Write Good Functional Requirements: User Stories and Acceptance Criteria
Write clear, testable functional requirements with user stories, INVEST, Given-When-Then acceptance criteria, use cases and good vs bad examples.
Functional vs Non-Functional Requirements: The Difference With Examples
Functional requirements say what a system does; non-functional requirements say how well. Clear definitions, examples, a comparison table and common mistakes...
Build a Minimal URL Shortener in Node.js and Redis
Hands-on tutorial: build a working URL shortener with Node.js, Express and Redis. Random Base62 codes, atomic inserts, redirects, expiry and click counts.
Preventing Abuse in a URL Shortener: Rate Limits, Malware and Expiry
Protect a URL shortener from spam and phishing: rate limiting, URL validation, Safe Browsing checks, link scanning, enumeration defence and expiry cleanup.
Click Analytics for a URL Shortener Without Slowing Down Redirects
Design click analytics for a URL shortener: async event pipelines with Kafka, aggregation with stream processing, counters, unique visitors and storage.
Scaling a URL Shortener: Caching, Read Replicas and Sharding
Scale a URL shortener to billions of redirects: Redis cache-aside, CDN edge caching, read replicas, consistent-hash sharding and multi-region deployment.
Redirects in a URL Shortener: 301 vs 302 vs 307 and Why It Matters
Choose the right redirect status for a URL shortener. How 301, 302, 307 and 308 affect browser caching, analytics accuracy, SEO and server load.
Generating Short Codes for a URL Shortener: Base62, Hashing and Counters
Compare short code strategies: hashing with collision handling, random codes, auto-increment counters with Base62, Snowflake IDs and pre-generated key ranges...
URL Shortener API Design and Data Model
Design the REST API and database schema for a URL shortener: endpoints, request/response shapes, indexes, SQL vs NoSQL choice and handling custom aliases.
How to Design a URL Shortener: Requirements and Capacity Estimation
System design walkthrough for a URL shortener like TinyURL: functional and non-functional requirements, traffic, storage and bandwidth estimates.