advanced

Microservices

Split services around business capabilities only when independent deployment, ownership, and scaling justify distributed-system cost.

Microservices split deployables around business capabilities with independent teams, scaling, and release cycles. Benefits come with distributed-system costs: network failures, eventual consistency, observability sprawl, and contract governance. Split only when organizational and technical drivers outweigh coordination overhead.

On interviews: name prerequisites—CI maturity, observability, API versioning, on-call ownership. Avoid "microservices because Netflix" answers.

Common pitfalls: nano-services with chatty calls; distributed monolith sharing one database; missing saga or outbox patterns for cross-service workflows.

Checklist:

  • Service owns its data and schema.
  • Contracts versioned with consumer-driven tests.
  • Tracing and SLOs per service boundary.
  • Team aligned to service ownership model.