Glossary · M

Microservices

Architecture style in which an application is built as a set of small, independently deployable services that communicate over the network.

By Obseria TeamUpdated

Definition

Microservices are an architectural style in which an application is built as a collection of small, loosely coupled services. Each service owns one business capability and its own data, runs in its own process, is deployed independently and communicates with other services over the network via APIs or messaging. The style trades simpler components for a more complex distributed system.

What are microservices?

Microservices are a way of structuring an application as many small services instead of one large, monolithic codebase. In an online shop, for example, catalog, cart, checkout, payment, inventory and shipping can each be a separate service with its own team, its own repository, its own database and its own release cycle. The services communicate over the network, typically via HTTP/REST, gRPC or asynchronous messaging such as Kafka.

The term became widely known through the 2014 article "Microservices" by James Lewis and Martin Fowler, which described common characteristics: componentization via services, organization around business capabilities, decentralized data management, infrastructure automation and design for failure. Containers and Kubernetes later made it practical to run hundreds of such services.

"Micro" does not refer to lines of code. A microservice is defined by its boundaries: it encapsulates one business capability, exposes it through a stable interface and hides its internal data. If two services must always be changed and deployed together, they are effectively one service split in two, sometimes called a distributed monolith, which combines the drawbacks of both styles.

Monolith vs. microservices

AspectMonolithMicroservices
DeploymentOne unit, deployed as a wholeEach service deployed independently
ScalingThe whole application scalesEach service scales on its own
DataUsually one shared databaseEach service owns its data
CommunicationIn-process function callsNetwork calls with latency and failure modes
DebuggingOne process, one stack traceA request spans many processes
Team structureShared codebaseTeams own services end to end

Neither style is better in general. A well-structured monolith is often the right choice for small teams, and many organizations start with a modular monolith and extract services where independent scaling or deployment really pays off.

Benefits and challenges

The main benefits are organizational and operational: teams can deploy without coordinating a big release, services can use the technology that fits their task, and a failure or load peak in one area does not have to affect everything else. The price is distributed-systems complexity:

  • Network failures and latency: every call can time out or fail, so patterns like timeouts, retries with backoff and the circuit breaker become necessary.
  • Cascading failures: one slow dependency can tie up threads and connections in all its callers.
  • Data consistency: transactions across services require patterns such as sagas and event-driven updates.
  • Operational overhead: many deployments, configurations, versions and dependencies to manage.

Why microservices need observability

In a monolith, a slow request can usually be explained with one log file and one profiler. In a microservice architecture, the same user request may touch a dozen services, and the symptom (a slow checkout page) often shows up far from the cause (a saturated database behind the inventory service). This is why observability is a precondition for operating microservices, not an add-on:

  • Distributed tracing follows each request across services; a trace shows which service and which call caused the delay.
  • A service map derived from traces shows dependencies that no architecture diagram keeps up to date.
  • Per-service golden signals (latency, traffic, errors, saturation) show the health of each service and its dependencies.
  • Correlated logs with trace IDs make it possible to read the logs of all services involved in one request.
  • Change tracking shows which of the many independent deployments preceded a problem.

All of this depends on consistent context propagation and common naming conventions across services, which is why OpenTelemetry has become the standard way to instrument microservices written in different languages.

Typical infrastructure

Microservices usually run in containers orchestrated by Kubernetes or a platform such as OpenShift. An API gateway handles external traffic, a service mesh can take over encryption, retries and traffic routing between services, and message brokers decouple services asynchronously. Each of these layers adds its own telemetry and its own failure modes.

Platform teams often provide this infrastructure as a paved road: a service template with OpenTelemetry instrumentation, health checks, dashboards and alerts preconfigured, so that every new service is observable from its first deployment.

How Obseria helps

Obseria is built for distributed architectures. Distributed tracing follows requests across services, TopoGraph builds the service map automatically, and the service catalog lists owners, dependencies and SLOs per service. Obseria Intelligence uses the topology to trace a symptom back to the causing service.

Frequently asked questions

A monolith is deployed as one unit and its components call each other in-process. Microservices are separate processes that are deployed and scaled independently and communicate over the network, which adds flexibility but also distributed-systems complexity.

There is no fixed size. A common guideline is that a service covers one business capability, owns its data and can be developed and deployed by one team without coordinating with others.

Combine distributed tracing across all services, golden signals per service, centralized logs with trace IDs, a service map of dependencies and deployment tracking. Instrumenting all services consistently with OpenTelemetry keeps the data comparable.

No. They pay off when teams need to deploy and scale parts of a system independently. For small teams or simple applications, a modular monolith is often easier to build, operate and debug.

Put these concepts into practice

Try Obseria free for 14 days, with OpenTelemetry and no proprietary agents.