StackLift
All terms

Glossary

Microservices

An architecture that splits one application into small services, each deployed and scaled on its own.

Microservices is an architecture style in which an application is built as a set of small, independently deployable services. Each service owns one business capability and its own data, and the services talk to each other over APIs or messages. Teams can change, release and scale one service without redeploying the rest.

The appeal is independence. Separate teams can ship on their own schedule, and a busy part of the system can scale without scaling everything else.

The price is complexity. Network calls fail, data is spread across services, and you need strong deployment, monitoring and testing practice. Many products are better served by a well-structured monolith until they outgrow it.

Start in 60 seconds

Put this to work on your project.

Get an AI-assisted, architect-reviewed scope, cost range, and timeline. Free, no login.

The complete guide

Microservices: the complete guide

Updated November 18, 2026 ยท Published by , Founder, StackLift AI. Written with AI assistance; how we make content.

Short answer

Microservices are an architecture in which an application is built as many small, independently deployable services, each owning one business capability and its own data. Services talk over APIs or messages. The style helps large teams release independently and scale parts separately, but it adds operational complexity that many products do not need yet.

What are microservices?

Picture an online store. In a traditional design, catalog, cart, payments and accounts are all parts of one program that is built and released together. In a microservices design, each of those is its own small program with its own code, its own release schedule and usually its own database. They cooperate by calling each other.

The defining traits are independence and ownership. A service can be deployed without redeploying the others, is owned by one team and exposes a clear interface, often an API. A service is sized around a business capability, such as billing or notifications, not around a technical layer such as "the database code".

The style is a way to split work and risk. It does not make an application faster by itself, and it does not fix tangled code. Without clear boundaries it only spreads the tangle across a network.

How do microservices work together?

Services talk in two main ways. Synchronous calls, usually over HTTP or gRPC, ask another service a question and wait. Asynchronous messages go through a queue or event stream, so the sender does not wait and the receiver handles the message when it can.

Common building blocks of a microservices system
PieceRole
API gatewaySingle entry point that routes, authenticates and rate-limits outside requests
Service discoveryLets services find each other as instances come and go
Message broker or event streamCarries asynchronous messages and events between services
Per-service data storeEach service owns its data, so others cannot reach into it
ObservabilityLogs, metrics and traces across services, see observability
Container platformRuns and scales services, often Kubernetes
CI/CD per serviceEach service builds, tests and ships on its own, see CI/CD
  1. A request reaches the API gateway.
  2. The gateway authenticates it and routes it to the right service.
  3. That service does its part, calling others or publishing events as needed.
  4. Each service reads and writes only its own data.
  5. Traces tie the steps together so a slow or failed step can be found.

Microservices vs. monolith: how do they compare?

Two ways to structure an application
Topic[Monolith](/glossary/monolith)Microservices
DeploymentOne unit, released togetherMany units, released independently
ScalingScale the whole appScale only the busy service
Local developmentRun one programRun several, or use shared environments
Failure handlingA bug can take down everythingFailures can be contained, but also cascade across calls
DataOne shared database, simple joinsData split by service, no easy joins
OperationsFewer moving partsMore infrastructure, monitoring and tooling
Team fitSmall and medium teamsMany teams that need to release independently

Neither is right everywhere. See the monolith vs. microservices comparison for a fuller treatment, and the monolith entry for the alternative.

What are the benefits and the costs?

The benefits are about organization as much as technology. Teams can choose their own release pace, hot spots can scale alone, a failing service can be isolated, and different services may use different technologies where it truly helps.

Trade-offs
BenefitCost that comes with it
Independent releasesMany pipelines, versioned interfaces and compatibility to maintain
Targeted scalingMore infrastructure to run and monitor
Fault isolationNetwork failures, timeouts and retries become normal
Team autonomyShared standards and a platform team become necessary
Technology choiceMore languages and tools to support and secure

A call between services is slower and less reliable than a function call inside one program. A single user action may cross many services, so tracing and good timeouts are not optional.

When should you use microservices?

  • Several teams keep blocking each other's releases in one codebase.
  • Parts of the system have very different scaling or reliability needs.
  • Clear business boundaries already exist and are stable.
  • You have the platform skills: CI/CD, observability, container operations and incident response.
  • Regulation or security needs isolate one capability, such as payments.

If those points do not describe you, a well-structured monolith, or a modular monolith, is usually the faster and cheaper path. Starting simple does not close any doors.

What are real-world examples of how products split into services?

Typical service boundaries by product type
ProductPossible services
E-commerceCatalog, search, cart, checkout, payments, orders, inventory, notifications
FintechAccounts, ledger, payments, identity checks, fraud scoring, statements
LogisticsShipments, routing, tracking, carrier integrations, billing
Healthcare platformPatients, scheduling, records, messaging, billing, reporting
SaaS productTenants, authentication, billing, core domain, reporting, integrations

Boundaries follow the business. If two parts always change together, they probably belong in one service. If they are owned by different teams and change at different speeds, a split may pay off.

How do you move to microservices safely?

  1. Map the domain and find stable seams, such as billing or notifications.
  2. Clean up the monolith first: clear modules, no shared tables across modules.
  3. Put an API gateway or routing layer in front of the monolith.
  4. Extract one service with clear edges and low coupling, and run it in parallel.
  5. Move traffic gradually, behind feature flags, and keep a way back.
  6. Add tracing, alerts and contract tests before extracting the next one.
  7. Stop when the pain is gone. Not everything has to be split.

This gradual approach is often called the strangler pattern: new services take over pieces of the old system until the rest is small enough to leave alone. See the legacy modernization roadmap and the rebuild vs. refactor comparison.

What patterns keep microservices reliable?

Once services talk over a network, ordinary failures become design inputs. A call can time out, a service can be slow, a message can arrive twice. A small set of patterns handles most of it.

Reliability and data patterns
PatternProblem it solvesHow it works
Timeouts and retriesA slow or failing dependency stalls callersGive up after a set time and retry with a delay, never forever
Circuit breakerRepeated calls to a failing service make things worseStop calling it for a while and return a fallback
IdempotencyA retry or duplicate message repeats an actionMake repeated requests safe, for example with a request key
SagaA business step spans several services, with no shared transactionEach step has a compensating step that undoes it if a later step fails
OutboxA service must save data and publish an event reliablyWrite the event to the local database, then publish it from there
Contract testingA change to one service breaks its callersCheck that provider and consumer agree on the interface before release

These patterns are standard practice, and none of them is needed in a monolith. That gap is a fair measure of what you take on when you split.

How do you test, observe and secure microservices?

Testing moves up a level. Each service needs its own unit and integration tests, plus contract tests with its neighbors, plus a small number of end-to-end checks across the whole flow. Running the entire system for every change is slow, so contracts carry most of the weight.

  • Use a correlation ID on every request, so one user action can be followed across services.
  • Collect logs, metrics and traces in one place, and alert on user-facing symptoms rather than only on service internals.
  • Set a service level objective for each important service so teams agree on what reliable means.
  • Authenticate calls between services, not only calls from outside, and give each service the minimum access it needs.
  • Keep secrets in a secrets manager and rotate them.
  • Scan images and dependencies in each pipeline, and define infrastructure as code (infrastructure as code).

Release practices help too. Canary releases and blue-green deployments let one service ship to a few users first and roll back fast if something looks wrong.

What tools and technologies are common?

Typical tooling
NeedCommon choices
Containers and runtimeDocker, Kubernetes, managed container services, serverless functions
Service communicationREST, gRPC, GraphQL
Messaging and eventsKafka, RabbitMQ, cloud queues and topics
API gateway and service meshCloud gateways, Kong, Envoy-based meshes
Data storesPostgreSQL, MongoDB, Redis, one choice per service as needed
ObservabilityOpenTelemetry with tracing and metrics platforms
DeliveryGitHub Actions or similar CI/CD, Terraform for infrastructure

Tools do not decide success. Clear boundaries, ownership and a habit of measuring do. Add tools when a real problem calls for them, not because a diagram includes a box for them.

What are the common mistakes?

  • Starting with microservices for a new product with no proven boundaries.
  • Making services too small, so every feature touches five of them.
  • Sharing one database between services, which hides coupling.
  • Building a distributed monolith: services that must deploy together.
  • Ignoring failure: no timeouts, retries or circuit breakers.
  • Skipping observability, then being unable to trace a problem.
  • Splitting the code but not the ownership, so teams still wait on each other.

Signals that the style is working: teams ship without coordinating, an incident stays within one service, and a new engineer can understand one service in a short time. If most changes still need several teams, the boundaries are wrong.

How do microservices affect teams?

Architecture and organization mirror each other. Microservices work best when a team owns a service end to end: design, code, deployment, monitoring and support. That ownership is what lets teams move without waiting.

It also changes the work. Teams must agree on interface rules, versioning and shared standards, and a platform group often provides the common tooling. Without that, each team reinvents deployment and monitoring, and the cost climbs.

What does it cost, and how does StackLift approach architecture choices?

Microservices raise effort in three places: more pipelines and infrastructure, the work of defining and testing service contracts, and the monitoring needed across services. The number of services, the team count and the reliability targets set the size of the job. See SaaS platform cost and cloud and DevOps cost.

StackLift picks the architecture by need. An architect reviews the scope and recommends the simplest structure that meets it, often a modular monolith first, with seams where a later split is likely. CI/CD, observability, security review and rollback are in the plan from sprint one. See enterprise SaaS build and run the free estimate.

Questions people ask

Are microservices better than a monolith?

Not by default. They solve problems of team size and independent scaling and create problems of complexity. Many products do better with a monolith until those problems appear.

How small should a microservice be?

Small enough for one team to own and understand, large enough to represent a real business capability. Size by responsibility, not by lines of code.

Do microservices need Kubernetes?

No. They can run on containers in a managed service, on a platform service or as serverless functions. Kubernetes helps when you run many services, but it is a choice, not a requirement.

What is a distributed monolith?

A system split into services that still depend on each other so tightly that they must be deployed or changed together. It carries the cost of microservices without the benefit.

How do microservices handle data?

Each service owns its data and exposes it through its interface. Cross-service consistency uses events, and patterns such as sagas coordinate multi-step changes instead of one shared transaction.

Can you migrate from a monolith gradually?

Yes, and it is usually safer than a rewrite. Extract one well-bounded piece at a time behind a routing layer and move traffic over in steps.

What is the difference between microservices and an API?

An API is an interface. Microservices are an architecture made of independently deployed services, which usually talk through APIs. An application with an API is not necessarily built from microservices.

How long does it take to move to microservices?

It depends on the size of the system and how tangled it is. Most teams extract services in stages over months, not at once. A scoped plan, such as a Scope Sprint, shows the order and effort before you commit.

Sources

Sources and further reading

The standards, rules, research and official documentation this page draws on.