A monolith is one application, deployed as one unit, usually with one database. Microservices split the product into small services (users, payments, notifications), each with its own data, deployed on its own, talking over HTTP/gRPC or a message queue such as Kafka.

What it buys, and what it costs

You gainYou pay
Teams ship their service without waiting for everyoneEvery call is a network call: slower, and it can fail
Scale only the busy part (e.g. search)Data is spread out; no single transaction across services
A bug or crash is contained to one serviceDebugging needs tracing across services
Each service can use the right toolMore deploys, more monitoring, more infrastructure (Docker, Kubernetes)

A common view: start with a well-structured monolith, split out a service when a team or scaling need forces it.

How services talk

  • Synchronous: service A calls B over HTTP and waits. Simple, but A is down when B is down.
  • Asynchronous: A publishes an event (“order placed”) to a queue; B, C, D react when they can. More resilient, harder to follow.

java and Spring Boot are a common microservice stack in large companies. Lesson 35 covers this in depth.

Check yourself