All academies
Roadmap
Level 04Foundations 30 min

Introduction to Microservices

The defining characteristics of microservice architecture and the core principles that make it work.

Hands-on lab: Monolith vs Microservices VisualizerPair this lesson with its interactive simulator

Definition

Microservice architecture structures an application as a collection of small, autonomous services, each built around a business capability, each independently deployable, and each owning its own data.

The word 'micro' misleads people into counting lines of code. Size is not the point — autonomy is. A microservice is 'micro' in its scope of responsibility, not necessarily in its codebase.

Clients (Web / Mobile)
API Gateway
User · Order · Payment · Inventory services
One database per service

Core characteristics

Sam Newman and James Lewis/Martin Fowler converge on a shared set of traits:

  • Organized around business capabilities — an Order service, not a 'database layer service'.
  • Independently deployable — shipping one service never requires shipping another.
  • Decentralized data — each service owns its database; no shared tables.
  • Communication over the network — REST, gRPC, or asynchronous messaging.
  • Designed for failure — every remote call can fail, and the architecture assumes it.
  • Owned by small teams — 'you build it, you run it' (Werner Vogels, Amazon).

The autonomy payoff

Independent deployability is the trait everything else serves. When teams deploy without coordination, release frequency goes from monthly release trains to dozens of deploys per day. Netflix deploys thousands of times daily across hundreds of services.

Autonomy also enables heterogeneity: the search team can use Elasticsearch and Java, the ML team Python, the edge team Node.js — each choosing the right tool without a committee.

The price you pay

Every benefit above is bought with distributed-systems complexity. In a monolith, a function call is reliable and instant; in microservices it becomes a network call that can fail, time out, or return stale data.

  • Network latency and partial failure on every inter-service call
  • No more cross-service ACID transactions — hello sagas and eventual consistency
  • Operational overhead: service discovery, gateways, observability, deployment pipelines per service
  • Harder end-to-end testing and debugging across service boundaries

Key takeaways

  • Microservices = small autonomous services around business capabilities, independently deployable, each owning its data.
  • Autonomy — especially independent deployment — is the defining benefit.
  • 'Micro' refers to scope of responsibility, not lines of code.
  • Benefits are bought with distributed-systems complexity: partial failure, eventual consistency, heavy ops.

Knowledge check

Q1Multiple choice

What is the single most important property of a microservice?

Q2Multiple choice

Why do microservices avoid sharing a database?

Q3Scenario

After splitting into microservices, a team notices checkout now involves 6 network hops and fails when any one service is down. What did they forget?

Answer all questions to submit