Intro

Architecture styles are high-level ways to organize systems: monoliths, microservices, serverless, SOA, and hybrids. Each style has predictable strengths and failure modes; the right choice depends on constraints more than hype. Example: serverless can reduce ops for spiky workloads, but observability and local testing become more important.

Choosing an Architecture

These six are competing ways to structure the same system. The first four are a decomposition spectrum (one process to many services); Event-Driven and Serverless are cross-cutting styles you layer on top.

StyleDeployment unitCoupling & communicationScaling modelOperational complexityReach for it when
Monolith ArchitectureOne process, one artifact, one shared databaseIn-process function calls; components share mutable state and one schemaScale the whole app as N identical copies behind a load balancer; no per-component scalingLow — one thing to deploy, monitor, debug; no distributed tracingSmall team, early product, boundaries still evolving; you want speed and ACID simplicity
Modular MonolithSingle deployment, strict internal module boundariesIn-process, but only through module contracts (interfaces, commands, events); schema/DbContext per moduleSame as monolith — scale the whole deployment togetherLow to medium — boundary discipline (architecture tests) but one runtimeGrowing product with clearer domains, limited ops capacity; you want clean boundaries and a cheap path to extraction
MicroservicesIndependently deployable services, database per serviceNetwork calls over versioned APIsevents; loose coupling, eventual consistencyScale hot paths independently, per serviceHigh — service mesh, tracing, retries, sagas, per-service pipelines
Service-Oriented ArchitectureCoarse-grained services, often deployed together on shared infraESB or SOAP/WSDL (REST today); shared databases acceptable; centralized governanceServices scale independently but at coarse granularityMedium to high — the ESB itself becomes a complex, governed componentIntegrating heterogeneous legacy/enterprise systems (SAP, ERP, mainframe) or regulated audit/governance needs
Event-Driven ArchitectureProducers and consumers around a message broker (KafkaRabbitMQ)Async publish/subscribe of facts; producers don’t know consumers; eventual consistencyConsumers scale independently (competing consumers), partition by aggregate keyMedium to high — broker ops, idempotency, ordering, distributed-flow debugging
Serverless ArchitectureStateless, short-lived functions (or serverless containers) managed by the providerTrigger/binding driven; stateless, so all state is externalizedAuto-scales per invocation and to zero when idleLow infra management, but local testing, cold starts, and observability get harderEvent-driven, bursty, or infrequent workloads where idle cost matters more than steady-state latency

Default to a monolith — ideally a Modular Monolith — while boundaries are still forming, then extract Microservices only when independent deployment or asymmetric scaling repeatedly blocks delivery; SOA is the enterprise-integration variant of that same “split into services” move, trading team autonomy for centralized governance over legacy systems. Event-Driven Architecture is not a rung on this ladder but a communication style you adopt once services need temporal decoupling and resilience, and serverless is a hosting model that pairs naturally with event-driven, bursty workloads. Choose from real constraints — team size, release pressure, domain volatility, ops maturity — not from hype, and re-evaluate as those constraints change.

References

6 items under this folder.