Catalog Service → Products, categories, searchOrder Service → Cart, checkout, order lifecyclePayment Service → Payment processing, refundsInventory Service → Stock levels, reservationsShipping Service → Carriers, tracking, deliveryCustomer Service → Profiles, addresses, preferencesNotification Service → Email, SMS, push notifications
4. Understanding Service Independence
Dimension
Independent
Coupled (Bad)
Build
Separate repo/pipeline per service
Monorepo with single build
Deploy
Deploy v2 of A without redeploying B
Lockstep releases
Scale
Scale A to 100 replicas, B stays at 2
Scale entire app together
Database
Each service owns DB schema
Shared tables across services
Runtime
Failure of A degrades but doesn't crash B
Cascading failures
Warning: If you cannot deploy a service independently, it's not a microservice — it's a distributed monolith.
5. Understanding Single Responsibility Principle
Question
Answer Indicates
"Why would this service change?"
If multiple unrelated reasons → split it
"Who owns the requirements?"
Multiple stakeholders → split by stakeholder
"What is its single business capability?"
If you can't state it in one sentence, refactor
"Does it have one source of truth?"
Yes → good cohesion; No → too broad
6. Understanding Microservices vs Monolith
Dimension
Monolith
Microservices
Deployment
Single artifact, all-or-nothing
Independent per service
Scaling
Scale entire app
Scale per service
Tech Stack
Single stack
Polyglot
Data
Single shared DB
Database per service
Team Coordination
High (shared code)
Low (autonomous teams)
Operational Complexity
Low
High (network, observability)
Initial Velocity
Fast
Slow (infrastructure setup)
Long-term Velocity
Slows with size
Sustains with size
Best For
Small teams, early product
Large orgs, mature product
Note: Start with a well-structured modular monolith. Extract microservices when team size, change frequency, or scaling needs justify the complexity.
7. Understanding Distributed Systems Challenges
Fallacy
Reality
Mitigation
Network is reliable
Packets drop, partitions occur
Retries, circuit breakers
Latency is zero
RTT can spike to seconds
Timeouts, async, batching
Bandwidth is infinite
Throttling, congestion happen
Compression, pagination
Network is secure
Threats inside and out
mTLS, zero-trust, encryption
Topology never changes
Instances scale, IPs change
Service discovery
One administrator
Many teams, many clouds
Federated governance
Transport cost is zero
Serialization, marshalling cost CPU
Efficient formats (Protobuf)
Network is homogeneous
Mix of clouds, regions, protocols
Adapters, gateways
8. Understanding Service Granularity
Granularity
Indicators
Risk
Too Coarse (Mega Service)
>3 teams, multiple capabilities, slow deploy
Becomes mini-monolith
Right-Sized
One team, one capability, focused API
—
Too Fine (Nanoservice)
Trivial logic, high inter-service chatter
Network overhead, ops burden
Note: Optimize for cognitive load and deploy independence, not for "smallest possible" services.
9. Understanding Service Ownership
Aspect
Owning Team Responsibility
Code
Repo, PRs, code reviews, tech choices
Build & Deploy
CI/CD pipelines, release cadence
Runtime
SLOs, on-call, incident response
Data
Schema, migrations, retention
API Contract
Versioning, deprecation, docs
Cost
Cloud spend, optimization
"You Build It, You Run It"
Devs own production operation, not a separate ops team
Reduces feedback loop between defects and fixes
Drives quality through accountability
10. Understanding Conway's Law
Concept
Description
Conway's Law
"Organizations design systems that mirror their communication structure"
Inverse Conway Maneuver
Restructure teams to drive desired architecture
Team Topologies
Stream-aligned, Platform, Enabling, Complicated-subsystem teams
Cognitive Load
Each team owns services within its mental capacity (~5-9 services)
Communication Cost
Cross-team dependencies → API contracts; intra-team → code