Introduction to Microservices
Microservices is an architectural style where a system is built as a collection of small, independently deployable services — each owning a single business capability, running its own process, and communicating over a network. It's the opposite of a monolith, where all features share one codebase and process. Microservices promise independent scaling, independent deployment, and technology freedom per service; they impose distributed-systems complexity: network calls, eventual consistency, service discovery, and operational overhead that a monolith sidesteps entirely. This page explains the model, its genuine benefits, its real costs, and when Node teams should actually reach for it.
The core idea
MONOLITH MICROSERVICES ┌──────────────────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ users orders billing │ │ Users │ │ Orders │ │ Billing │ │ products search emails │ │ Service │ │ Service │ │ Service │ │ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ one process │ └─────────────┴─────────────┘ │ one database │ network calls └──────────────────────────┘ each has its OWN database, deploy cycle
Genuine benefits
Independent deployment — ship the orders service on Tuesday and billing on Thursday without coordinating or risking the whole app.
Independent scaling — scale the search service to 100 instances without scaling the unrelated user-settings service.
Technology freedom — a computationally intensive service can be Go; a data-science service can be Python; the user-facing API can be Node.
Fault isolation — a buggy billing service crashes in isolation; orders and users keep serving (with proper bulkheads and timeouts).
Team autonomy — small teams own small services end to end, avoiding coordination overhead that grows quadratically in a monolith.
Real costs
Node and microservices — a natural fit, with caveats
Node strength in microservices | Watch out for |
|---|---|
Fast startup — ideal for containers that scale to zero | CPU-heavy services belong in Go/Rust, not Node |
Async I/O — efficient for service-to-service HTTP calls and event consumers | Single-threaded; blocking one consumer blocks all |
Small, focused services match Node's lightweight module model | Shared libraries across services create coupling without visibility |
TypeScript shared types across services (in a monorepo) | Cross-service type sharing can recreate tight coupling |