Home › Guides › Microservices architecture
Tech Explained · 2026What Is Microservices Architecture? How It Works, Microservices vs Monolith and a Worked Example in 2026
Microservices architecture splits one application into small, independently deployable services that each own their data and talk over the network. Teams ship and scale each service alone instead of redeploying everything. The trade is operational: every call that was a function call becomes a network hop, and Prime Video reported cutting infrastructure cost over 90% by merging some back.
- A service is a deployment boundary, not a code folder. If two services must be released together, you have one service in two repositories and all the latency of two.
- Each service owns its own database. The moment two services share a table, you have a distributed monolith, which is the worst of both designs.
- Start with three to five services, not thirty. Split along the lines where your teams already argue about release dates.
- Most microservices pain is network pain. Timeouts, retries and partial failure are the new bugs, and they do not reproduce on your laptop.
- Orchestration is a line item. AWS Step Functions bills $0.000025 per state transition in US East (N. Virginia), which is invisible until the fan-out is per video frame.
- You can run a real two-service system locally in 15 minutes with Docker Compose and two FastAPI files, and you should before reading any more architecture diagrams.
You change one line in the invoice PDF template, and to ship it you have to redeploy the entire platform: checkout, search, the admin console, everything. Release night is three hours long, four teams sit on a call, and the rollback plan is a database backup. That specific pain, repeated for two years, is why microservices exist. Not scale. Not resumes. Release coupling.
How Microservices Architecture Works
A microservices architecture takes one application and cuts it into services that each do one business job, each run as their own process, and each get deployed on their own schedule. An order service, a payments service, a notification service. They do not call each other's functions because they cannot: they are separate processes, often on separate machines, so they talk over HTTP or gRPC or by putting messages on a queue.
Three rules do almost all the work, and the rest is tooling:
- One service, one deployment. You can release payments at 11am on a Tuesday without anyone else's permission. If you cannot, it is not a service.
- One service, one datastore. The orders service owns the orders tables and nobody else touches them, ever, not even for a read-only report. Other services ask over the API.
- Failure is normal and local. When notifications is down, checkout still takes money. That only happens if you designed for it.
Rule two is the one people break, and it is the expensive one. A shared database looks harmless because the join is so easy to write. Then two services disagree about whether a column can be null, a migration locks a table during someone else's peak, and you discover you have to deploy both services together after all. You now pay the network cost of microservices and keep the release cost of a monolith.
A request through a three-service system
Follow the solid arrows: one browser click becomes four network calls, each of which can time out independently.
Solid grey arrows are synchronous and block the user. Dashed red arrows are asynchronous and do not. Diagram checked 26 October 2026.
Notice what the diagram says about the user's wait. The browser only waits for the grey arrows. The notification email leaves the critical path entirely, which means a dead SMTP provider cannot stop you taking money. That single decision, moving one call from synchronous to asynchronous, buys more reliability than any amount of retry logic.
Microservices vs Monolith: Which One Is Actually Right for You
The honest comparison is not about which design is better. It is about which cost you would rather pay, because both have one.
| Dimension | Monolith | Microservices |
|---|---|---|
| Deploy unit | One artefact, everything ships together | One artefact per service, each on its own schedule |
| Calling another module | Function call, nanoseconds, cannot fail halfway | Network call, milliseconds, can time out or half succeed |
| Data consistency | One transaction, one rollback | Saga or outbox pattern, compensating actions you write yourself |
| Debugging a slow request | One stack trace | Distributed trace across 4 to 12 spans, useless without instrumentation |
| Scaling the hot path | Scale the whole app, waste capacity on cold code | Scale only search, leave the admin console at one replica |
| Team size it suits | 1 to 2 teams who talk daily | 4 or more teams who need to stop coordinating releases |
| Local development | Run it, it works | Docker Compose, stubs, or a shared dev cluster and a VPN |
| Dominant cost | Release coordination | Operations: networking, observability, on-call |
Here is the opinion, and we will commit to it: if you have fewer than four engineering teams, build a well structured monolith. Keep clean module boundaries, separate schemas inside one database, and no cross-module imports. You get most of the design discipline of microservices with none of the network bill, and when a module genuinely needs its own release cadence, you lift it out as the first service. That is a cheap, reversible path. Going the other direction, from thirty services back to something coherent, is the most expensive refactor in software.
The trade we are accepting with that advice is real: a monolith will eventually force you into release trains you hate, and some teams will hit that wall a year earlier than they expected. We think that is a better problem than being a four-person team running an eleven-service platform at 2am.
If service boundaries and failure modes are the part you want to practise rather than read about, the AWS Solutions Architect and DevOps Engineer course spends its middle weeks on exactly this, deploying multi-service systems on ECS and EKS with real health checks. The Azure architecture equivalent (AZ-305 plus AZ-400) covers the same ground with App Service and AKS if your employer is a Microsoft shop.
Also read: What Is Kubernetes? Plain-English Definition, How It Works and Where You Will Use It in 2026, which is the orchestration layer most microservices end up sitting on.
How Microservices Communicate: REST, gRPC and Events
Every service boundary forces a question you never had to answer inside a monolith: does the caller wait? Get that wrong and you build a system where one slow service makes all of them look broken.
| Style | Use it when | What breaks |
|---|---|---|
| REST over HTTP/JSON | Public APIs, browser clients, anything a human will curl while debugging | Chatty call patterns: one page render triggers 30 calls and nobody notices until a slow day |
| gRPC | Internal service to service traffic where payloads are large or latency matters | Browsers cannot call it directly, and a changed .proto field number breaks clients silently |
| Events on a broker (Kafka, SQS, Service Bus) | Anything the caller should not wait for: emails, search reindexing, analytics | Eventual consistency surprises product teams, and duplicate delivery means consumers must be idempotent |
| Shared database | Never, between services | Everything in this table, at once |
The practical rule: synchronous if the user is staring at a spinner that depends on the answer, asynchronous otherwise. Checkout must know whether the card was charged, so that call waits. Checkout does not need to know the receipt email was delivered, so that one goes on a bus. Our scenario for the rest of this guide is a two-person platform team at a mid-size Indian insurer who are carving a policy renewal flow out of a nine-year-old Java monolith, and this is the first decision they got right: renewals publish a policy.renewed event, and the five downstream consumers (SMS, email, CRM sync, actuarial feed, audit log) stopped being the renewal team's problem.
If event streaming is new to you, our guide to how Kafka topics, partitions and consumer groups work is the next thing to read, and a live Microsoft Fabric data engineering program is where the streaming and pipeline side gets drilled properly if you want the data engineering angle rather than the application one.
What Usually Goes Wrong With Microservices Architecture
Nobody warns you about these in the conference talk. A colleague would, over a desk, on your second week.
Six failure modes that show up in month three
Each one has a symptom you will actually see in logs or dashboards, and a fix that is cheaper than a rewrite.
The distributed monolith
Four services, one shared schema, and every release needs all four deployed in order. Symptom: a release runbook with numbered steps. Fix: give each service its own schema first, even inside the same database server, then split the server later.
BoundariesRetry storms
Payments gets slow, orders retries three times, the gateway retries orders, and now payments is getting nine times its normal load. Symptom: load spikes that outlast the original incident. Fix: retries only at the outermost layer, with jitter, plus a circuit breaker.
ResilienceNo timeout, so no limit
A default HTTP client with no timeout will wait forever, holding a connection and a thread. Symptom: thread pool exhaustion with low CPU. Fix: set an explicit timeout on every outbound call, shorter than your caller's timeout.
NetworkingOrchestration billed per step
A workflow engine that charges per state transition is fine for 40 steps and ruinous for 40 million. Prime Video hit exactly this. Symptom: a cloud bill line item growing with traffic, not with features. Fix: batch inside one process, or move the fan-out in memory.
CostLogs without a correlation ID
Three services logged the error and you cannot tell if it was the same request. Symptom: grepping by timestamp. Fix: generate a trace ID at the gateway, pass it in a header, log it on every line, from day one.
ObservabilityService mesh too early
Istio gives you mutual TLS and traffic shifting, and it also gives you a second control plane to debug at 2am. Symptom: nobody on the team can explain a 503 from the sidecar. Fix: wait until you have roughly ten services and a reason.
ToolingPatterns drawn from published engineering write-ups and vendor documentation reviewed 26 October 2026.
Microservices are oversold, and the thing most often sold is independence. You get deployment independence. You do not get cognitive independence: your on-call engineer still has to understand how the other eight services behave when they fail, and now they have to understand the network too. If your real problem is a messy codebase rather than a release bottleneck, microservices will not fix it. They will distribute it, and add latency.
On the mesh question specifically, the versions matter. Ambient mode, which replaces per-pod sidecars with a node level ztunnel and an optional waypoint proxy, reached general availability in Istio 1.24 according to Red Hat's OpenShift Service Mesh 3 release notes, and Red Hat's OpenShift Service Mesh 3.4 notes list Istio 1.30 as the version it ships. Ambient is a genuine improvement because it cuts the per-pod memory tax. It is still a mesh, and it is still a thing you operate.
A Worked Microservices Example You Can Run in 15 Minutes
Two services, two ports, one network, no cloud account. This is the smallest honest microservices example: a catalogue service that owns item data and an orders service that has to ask it. Save the first file as catalogue/main.py.
# catalogue/main.py
from fastapi import FastAPI, HTTPException
app = FastAPI()
ITEMS = {"sku-1": {"name": "Helmet", "price": 1899}}
@app.get("/health")
def health():
return {"ok": True}
@app.get("/items/{sku}")
def get_item(sku: str):
if sku not in ITEMS:
raise HTTPException(status_code=404, detail="unknown sku")
return ITEMS[sku]
Now the orders service. The important lines are not the business logic, they are the timeout and the fallback. This is the difference between a microservice and a liability.
# orders/main.py
import os, httpx
from fastapi import FastAPI, HTTPException
app = FastAPI()
CATALOGUE = os.environ["CATALOGUE_URL"]
@app.post("/orders/{sku}")
async def create_order(sku: str):
try:
async with httpx.AsyncClient(timeout=2.0) as client:
r = await client.get(f"{CATALOGUE}/items/{sku}")
except httpx.TimeoutException:
raise HTTPException(status_code=503, detail="catalogue slow, try again")
if r.status_code == 404:
raise HTTPException(status_code=400, detail="bad sku")
item = r.json()
return {"sku": sku, "charged_paise": item["price"] * 100}
Wire them together. Note there is no version: key at the top of this file: the Docker documentation states the top level version attribute is kept only for backward compatibility, is purely informative, and emits an obsolete warning, because Compose always validates against the most recent schema regardless.
# docker-compose.yml
services:
catalogue:
build: ./catalogue
command: uvicorn main:app --host 0.0.0.0 --port 8000
orders:
build: ./orders
command: uvicorn main:app --host 0.0.0.0 --port 8000
environment:
CATALOGUE_URL: http://catalogue:8000
ports: ["8001:8000"]
depends_on: [catalogue]
Each service needs a three line Dockerfile (FROM python:3.12-slim, RUN pip install fastapi uvicorn httpx, COPY . /app with WORKDIR /app). Then run it and prove the interesting case rather than the happy one:
docker compose up --build -d
curl -s -X POST http://localhost:8001/orders/sku-1
# {"sku":"sku-1","charged_paise":189900}
# now kill the dependency and watch the boundary hold
docker compose stop catalogue
curl -s -o /dev/null -w "%{http_code}\n" -X POST http://localhost:8001/orders/sku-1
# 503
That 503 is the whole lesson. Orders did not hang, did not crash, and did not charge a card for an item it could not price. It failed in two seconds with a status code a load balancer understands. Delete the timeout=2.0 argument, repeat the experiment, and the request will sit there until your client gives up. Do it once so you remember the shape of the bug.
Also read: Docker Tutorial for Beginners 2026: Containerise a Python API in 7 Steps if the Dockerfile part is where you got stuck.
Where You Will Meet Microservices Architecture in Real Work
Three places, all of them jobs people actually hold in India right now.
Carving one service off a legacy monolith
This is the most common microservices work and it is almost never greenfield. Our insurer team is not building a new platform, they are extracting policy renewals because that team wants to ship weekly while the monolith releases monthly. The work is unglamorous: find every read of the renewal tables, put an API in front of them, run both paths in parallel for a month, then cut over. Backend engineers with three to six years of experience spend whole quarters here.
Running the platform the services sit on
Someone has to own the cluster, the ingress, the certificates and the deploy pipeline. That is the DevOps or platform role, and it is why Kubernetes and container skills appear in nearly every microservices job advert. Those upgrade cycles are the job, and they have hard dates: 1.36 is the current stable Kubernetes line, and the kubernetes.io release page for 1.34 lists its end of life as 27 October 2026, so a cluster still on 1.34 loses support tomorrow. Both the AWS SAA-C03 and DOP-C02 track and the Azure equivalent build the cluster and pipeline work as graded labs, and the full certifications overview compares the two ladders.
Putting AI services into an existing architecture
A retrieval service with its own vector store, behind its own API, with its own scaling profile is a microservice like any other, and it is where a lot of 2026 hiring sits. The failure modes are the same ones in the table above, plus token cost. If that is the direction you want, 360DT's AI Engineer course covering RAG and AI agents treats the retrieval service as a deployable component rather than a notebook, and the MLOps Engineer course (AI-300) covers the serving and monitoring half. For enterprise deployment work specifically, the Forward Deployed Engineer course is the one that puts you in front of a customer's architecture.
Case Study: When Amazon Prime Video Merged Its Microservices Back
In March 2023, Marcin Kolny published an account on the Prime Video Tech blog of how the Video Quality Analysis team rebuilt its audio and video monitoring service. The original design was textbook serverless microservices: AWS Step Functions orchestrated the components, and video frames were passed between them through an S3 bucket. It worked, and it did not scale economically.
Two costs dominated, and both are worth memorising because they are generic. First, Step Functions bills per state transition. The official AWS pricing page puts Standard Workflows at $0.000025 per transition in US East (N. Virginia), with 4,000 free transitions a month that do not expire at the end of the 12 month free tier window. AWS's own example on that page works out a four state workflow run 100,000 times to 396,000 billable transitions, or $9.90. Now make the fan-out per frame of video instead of per job and run it across a streaming catalogue. Second, every frame handoff through S3 was a billed request, and those Tier 1 calls were the other half of the bill.
The fix was to put every component into a single process running in one Amazon ECS task, which kept frame data in memory and removed both the orchestration transitions and the S3 round trips. Reported result: infrastructure cost down by over 90%, with more scaling headroom than before. To go past one instance, they cloned the whole service rather than splitting it again.
Four numbers worth remembering
All four were checked against primary or vendor sources on the date below.
Sources: Prime Video Tech blog (Kolny, 22 March 2023), AWS Step Functions pricing page, kubernetes.io releases, Red Hat OpenShift Service Mesh release notes. Checked 26 October 2026.
The lesson that gets mangled in the retellings is not "microservices are bad". It is that a boundary is a cost, and when the traffic across a boundary is enormous and the data crossing it is large, that cost can exceed everything the boundary bought you. Prime Video kept the service boundary around the whole monitoring system. They removed the boundaries inside it.
Build and operate multi-service systems, not just read the diagrams
A 12 week live program that prepares you for both AWS Solutions Architect Associate (SAA-C03) and AWS DevOps Engineer Professional (DOP-C02). Includes hands on projects, mentor support and placement guidance.
Explore the course
How to Learn Microservices Architecture Properly
Reading about microservices architecture teaches you vocabulary. Operating three services that can fail independently teaches you the thing. Containers first, then an orchestrator, then observability, and only then patterns like sagas and circuit breakers, because a pattern makes no sense until you have met the failure it answers.
The sequence we would give the insurer team: finish the 15 minute example above, add a correlation ID header and a health check, deploy both services to one cluster, then deliberately break one and read the trace. If you want that with a syllabus, a cohort and someone reviewing your architecture decisions, the AWS Solutions Architect and DevOps Engineer course is the closest fit on our roster: the SAA-C03 half teaches the design choices, the DOP-C02 half teaches the pipeline and monitoring that make them survivable. Classes run Saturday and Sunday, 8:00 to 11:00 PM IST, over 12 weeks.
If you are not ready to commit money to this yet, which is a reasonable place to be, sit in on a free webinar or book a demo class first and see whether the teaching style matches how you learn.
Related guides
- Docker vs Kubernetes in 2026: Real Costs, 14 Criteria and Which to Learn First in India settles the question of which container skill to pick up first before you run services in anger.
- What Is Load Balancing? How It Works, 6 Algorithms and Load Balancer vs Reverse Proxy in 2026 explains the layer that sits in front of every service in the diagram above.
- What Is CI/CD? How the Pipeline Works, CI vs CD, and Your First Workflow in 2026 is the prerequisite nobody mentions: independent deploys need independent pipelines.
- DevOps Interview Questions 2026: 15 Real Questions, Model Answers and the Red Flags to Avoid because "how would you debug a slow request across services" is a question you will be asked.
- Terraform vs Ansible in 2026: 12 Criteria, Real Pricing and Which One to Learn First for DevOps Jobs in India covers how you actually create the infrastructure all these services run on.
- SAA-C03 Certification Guide 2026: AWS Certified Solutions Architect Associate maps the exam domains that test the design decisions in this guide.
Frequently asked questions
What is microservices architecture in simple terms?
Microservices architecture means building one application as a set of small services that each do one business job, run as their own process, own their own data, and get deployed independently. Instead of calling a function in the same program, they send each other network requests or messages. The benefit is independent releases and independent scaling. The cost is that every call can now fail on its own.
What is the difference between microservices and monolithic architecture?
A monolith ships as one deployable artefact with one database and one transaction boundary, so a module call is a function call that cannot half succeed. Microservices ship as many artefacts, each with its own datastore, so the same call is a network request with timeouts and partial failure. Monoliths pay in release coordination, microservices pay in operations: networking, tracing and on-call.
How many microservices should a small team have?
Fewer than you think. With fewer than four engineering teams, a well structured monolith with clean module boundaries and separate schemas is usually the better call, and you extract your first service only when one part genuinely needs a different release cadence. Three to five services is a healthy starting point for a team that has outgrown a monolith. Thirty services with eight engineers is a pager rota, not an architecture.
How do microservices communicate with each other?
Three common ways. REST over HTTP and JSON for anything public or human debuggable, gRPC for internal traffic where payload size or latency matters, and events on a broker such as Kafka, SQS or Azure Service Bus for work the caller should not wait for. The rule of thumb: synchronous if a user is waiting on the answer, asynchronous otherwise. Services should never share a database table.
Can two microservices share the same database?
They should not. Once two services read or write the same tables you have a distributed monolith: schema changes need coordinated releases, one service's migration can lock the other's queries, and you are paying network latency without getting deployment independence. If you cannot split the database yet, give each service its own schema inside the same server as a first step, and move the data behind an API.
Do I need Kubernetes to run microservices?
No. Docker Compose is enough to run and learn a multi-service system locally, and managed container services such as Amazon ECS or Azure App Service run small production fleets without a cluster to operate. Kubernetes earns its complexity once you have many services, multiple teams deploying, and real autoscaling needs. Plenty of five-service systems run perfectly well without it.
Why did Amazon Prime Video move from microservices back to a monolith?
According to a March 2023 Prime Video Tech blog post by Marcin Kolny, the Video Quality Analysis team's monitoring service paid twice for its boundaries: AWS Step Functions charged per state transition at very high volume, and video frames were handed between components through an S3 bucket, which meant billed requests. Moving every component into one process inside a single Amazon ECS task kept frames in memory and cut reported infrastructure cost by over 90%.
Is a service mesh required for microservices?
Not at the start. A mesh such as Istio or Linkerd gives you mutual TLS, traffic shifting and uniform telemetry without changing application code, which is genuinely useful at scale. It also adds a control plane and a proxy to every data path, so a 503 can now come from somewhere nobody on the team understands. Ambient mode, generally available since Istio 1.24, reduces the per-pod overhead but does not remove the operational burden. Most teams should wait until roughly ten services.
About this guide. 360 Digital Transformation is an Anthropic Partner and a Microsoft Authorized Training Partner. Other certification bodies, vendors and employers named here are not affiliated with us. Tools and versions change quickly; commands and figures cited were checked on 26 October 2026.




