Key Concepts
Microservices solve real problems at scale — but they introduce new complexity. Know before you commit.
Monolithic Architecture
Single deployable unit containing all application logic. Simple to develop, test, and deploy initially.
Microservices
Application as suite of small, independent services. Each owns its data. Communicates via API.
API Design for Services
REST, gRPC, GraphQL — the interface between microservices. Must be designed for evolution.
Service Mesh
Infrastructure layer handling service-to-service communication — load balancing, service discovery, mTLS, observability.
Concept Deep Dives
Click each concept to expand — real examples, diagrams, pros & cons.
Monolithic Architecture
When to Use
MVPs, small teams, early-stage products, unclear domain boundaries.
Real-World Example
Stack Overflow: monolith serving 1.3 billion page views/month on a handful of servers. Still a monolith in 2024.
✓ Advantages
- Simple to develop and debug
- Single deployment
- No network latency between components
- Easy to test end-to-end
⚠ Watch Out
- Scaling = scale everything
- Long build/deploy times as it grows
- Team coordination at scale
Microservices
When to Use
Large teams, clear domain boundaries, need independent scaling and deployment.
Real-World Example
Netflix: 700+ microservices. Amazon: 'Two-pizza teams' — service owned by team that can be fed with 2 pizzas.
✓ Advantages
- Independent deployment
- Independent scaling
- Technology diversity
- Small, focused teams
⚠ Watch Out
- Network latency everywhere
- Distributed transaction complexity
- Operational overhead (k8s, service mesh)
- Testing is hard
API Design for Services
When to Use
Designing inter-service communication — your API is your contract.
Real-World Example
Netflix API gateway: single entry point for all 700+ services. Clients don't know internal structure.
✓ Advantages
- Decoupled teams
- API versioning enables gradual migration
- Clear contracts
⚠ Watch Out
- API changes must be backward-compatible
- Versioning management overhead
Service Mesh
When to Use
Large microservices systems where operational concerns (security, observability) are consistent across all services.
Real-World Example
Istio, Linkerd, Consul Connect. Used by Lyft, Google, IBM at scale.
✓ Advantages
- Consistent security (mTLS) across all services
- Centralized observability
- Traffic management
⚠ Watch Out
- Significant operational complexity
- Performance overhead of sidecar proxies
Quick Reference
- 1Monolith: single deployable unit. Simple to develop, complex to scale.
- 2Microservices: small, independent services communicating via APIs.
- 3Microservices advantages: independent deployment, scaling, team ownership.
- 4Microservices challenges: distributed transactions, operational complexity, testing.
- 5Start monolithic, split when pain is real (Fowler's advice).
- 6API design is critical — microservice APIs are public contracts.
- 7Service mesh handles cross-cutting concerns: security, observability, traffic management.
From the Book & Beyond
Case Study — The In-Car Information System (Fig 18.1)
Figure 18.1 is Sommerville's flagship service example: a service-based in-car information system. Five in-car modules (user interface, locator, transmitter, receiver, radio) send the car's GPS position to an external mobile information service, which uses a service discovery service to find and bind local weather, road traffic, and facilities services — then a translator service converts the aggregated stream into the driver's own language. The punchline: no provider is hard-wired at deployment. As the car crosses a border, the system discovers and binds to new local services at runtime. That late, dynamic binding is the core promise of service-oriented architecture.
2026 Perspective — The Microservices Backlash
The pendulum swung. In 2023, Amazon Prime Video published a case study describing how it merged its distributed video-monitoring microservices back into a monolith, reporting infrastructure cost savings of around 90% — a wake-up call from the company that popularized services. By 2026 the pragmatic default is the modular monolith: enforce service-style boundaries inside one deployable, and only extract a true microservice when scaling or team ownership genuinely demands it. Microservices didn't die; teams just stopped paying the distributed-systems tax — network calls, eventual consistency, operational sprawl — for problems a single process could solve.
Quiz — Test Yourself
Think through your answer first, then reveal.