Top 30 Microservices Interview Questions and Answers [2026]
October 13, 2026
15 min read
TL;DR: Microservices interviews test judgment more than tools: when to split, where to draw boundaries, how services stay consistent without shared transactions, and how failures are kept from spreading. In 2026, expect questions on sidecar-free service meshes, native Kubernetes sidecars and AWS App Mesh's shutdown on September 30, 2026.
AWS stops supporting App Mesh on September 30, 2026, and teams still on it must move to ECS Service Connect or VPC Lattice.
That is a fitting 2026 interview topic, because it tests what candidates know about the plumbing between services, not only the services. The questions below cover design, data, communication, security and operations.
We skipped topics our API gateway and event-driven guides already cover, and link to them instead.
Key takeaways
1Fowler's "Monolith First" rule still holds: almost every success story he heard began as a monolith that grew too big.
2Istio's ambient mode reached GA on November 7, 2024, so a mesh no longer needs a proxy in every pod.
3Kubernetes made native sidecar containers stable in v1.33, fixing start and stop order for proxies and log agents.
4Three services that each retry 3 times can hit the bottom one 27 times for a single user request.
Design and Boundaries
1. What makes a system a microservice architecture?
James Lewis and Martin Fowler's 2014 article lists the traits. Services are built around business capabilities, deployed on their own, and run as separate processes that talk over lightweight protocols. Each one manages its own data.
Teams own a service from build to production.
The key test is independent deployment. If three services must release together, they are one system split across three repositories.
2. When should you not use microservices?
When the team is small, the domain is still unclear, or nobody can yet run many services in production. Fowler's Monolith First post says almost all successful microservice stories he heard started as a monolith that grew too big.
Systems built as microservices from day one usually ran into serious trouble.
A well-structured modular monolith gives most of the code boundaries at a fraction of the running cost. Strong candidates say this without being asked.
3. How do you decide where one service ends and the next begins?
Along business capabilities, not technical layers. Decompose by business capability gives services like Billing, Catalog and Shipping, not "database service" or "email service."
Check each boundary with three questions. Can one team own it? Can it change without changing its neighbors? Does it hold its own data? DDD's bounded contexts are the usual tool; see our DDD interview guide.
4. What is a distributed monolith, and how do you spot one?
It is a system split into services that still behave like one program. The signs:
Services must deploy together, in a fixed order.
Several services read and write the same database tables.
One user request makes a long chain of synchronous calls.
A shared library with business logic forces every team to upgrade at once.
It has the costs of both styles and the benefits of neither.
5. How big should a microservice be?
Small enough for one team to own and understand, and big enough that most changes stay inside it. Lines of code are a poor measure.
A useful check is change coupling. If most features touch two services together, they are one service split too finely. Merging them is a valid fix.
6. How does the strangler fig migration work, and what usually goes wrong?
New code grows around the old system and takes over one piece at a time. A routing layer sends each feature to the new service once it is ready, until the monolith can be retired. Fowler describes it in Strangler Fig Application.
What goes wrong: the data. The new service needs data the monolith still owns, so teams share the database "for now," and it stays shared. Plan data ownership for each slice before moving the code.
Data
7. Why does each service own its database, and what does that cost?
So a service can change its schema and storage without asking anyone. Other services reach its data only through its API or its events. That is the database per service pattern.
The cost: no joins across services, no transactions across services, and copies of data that can be briefly out of date. A logical split, with separate schemas on one server, keeps most of the benefit and cuts the running cost.
8. How do you build a screen that needs data from five services?
Two options. API composition calls each service and joins the results in memory, which is simple but as slow as the slowest call.
A read model subscribes to the services' events and keeps a copy of the joined data, which is fast but eventually consistent.
Use composition for low traffic and fresh data, a read model for busy screens. Our CQRS guide covers read models in depth.
9. Why not use two-phase commit across services?
Because it couples the services at runtime. Two-phase commit locks data in every participant until the coordinator decides. If the coordinator fails between the phases, those locks can stay held.
Many brokers and cloud databases do not support it anyway.
Instead, services use local transactions plus a saga: a series of steps with compensating actions. Our event-driven architecture guide covers sagas and choreography.
10. How does the outbox relay get messages out: polling or log tailing?
The transactional outbox writes the message to a table in the same transaction as the data. A relay then publishes it. Chris Richardson's catalog names two relays:
Polling publisher: query the outbox table on a timer. Simple and works on any database, but adds query load and some delay.
Transaction log tailing: read the database's own log, for example with Debezium. Low delay and no polling load, but more parts to run.
Both deliver at least once, so consumers must handle duplicates.
11. How do you change an API that other services call?
In steps that keep old callers working. Add fields, never rename or remove them in place. For a breaking change, run the old and new versions side by side, move consumers over, then remove the old one.
Consumer-driven contract tests catch mistakes early. Each consumer publishes what it expects, and the provider's build checks it still meets every expectation. Pact is the common tool.
12. How do you change a database schema with zero downtime?
Expand, migrate, contract. Add the new column as nullable and deploy code that writes both old and new. Backfill old rows. Switch reads to the new column. Only then drop the old one, in a later release.
During a rolling deploy, old and new code run at the same time. Every schema change must work with both.
Communication
13. Should services talk synchronously or asynchronously?
Synchronous calls (HTTP, gRPC) suit requests that need an answer now, such as a price check. The caller then depends on the other service being up.
Synchronous call
Answer now, in the same request
Caller fails if the callee is down
Needs timeouts on every hop
Asynchronous message
Work finishes later
Sender keeps working when the receiver is down
Needs idempotent consumers
Asynchronous messages suit work that can finish later, such as sending a receipt. The sender keeps working when the receiver is down. Most systems use both.
A good answer asks which calls sit on the user's critical path, and keeps that path short.
14. When would you use gRPC between services?
For internal calls where speed and strict contracts matter. gRPC runs on HTTP/2, uses Protocol Buffers for compact messages, generates typed clients, and supports streaming both ways.
Browsers cannot call it directly without a proxy layer such as gRPC-Web, so public APIs usually stay on HTTP and JSON. Spring Boot 4.1 added built-in gRPC support. Our gRPC guide goes deeper.
15. Why do retry storms happen, and how do you stop them?
Retries multiply across layers. If a gateway, service A and service B each try 3 times, a failing service C can get 27 calls for one user request. That extra load keeps C down.
The fixes: retry at one layer only, cap retries with a budget, and add backoff with jitter so clients do not retry in sync. The AWS Builders' Library explains the jitter math.
static <T> T callWithRetry(Supplier<T> call, int maxAttempts, long baseMs, long capMs)
throws InterruptedException {
for (int attempt = 0; ; attempt++) {
try {
return call.get();
} catch (RuntimeException e) {
if (attempt + 1 >= maxAttempts) throw e;
long ceiling = Math.min(capMs, baseMs * (1L << attempt));
Thread.sleep(ThreadLocalRandom.current().nextLong(ceiling + 1)); // full jitter
}
}
}
Tested. We ran this on Java 25. A call that failed twice succeeded on the third try, and a call that always failed stopped after 4 attempts.
Retry only safe or idempotent operations.
16. How should timeouts work across a chain of calls?
Each call's timeout must be shorter than its caller's. Otherwise the caller gives up while the work below it keeps running for nothing.
Better still, pass a deadline down the chain. gRPC does this natively: the client sets a deadline, and servers can check how much time is left before starting expensive work.
17. What is a bulkhead?
A limit that keeps one failing dependency from using up everything. Give each downstream service its own connection pool or concurrency limit. When one slows down, only its pool fills, and calls to other services still work.
The name comes from the sealed compartments in a ship's hull. Without bulkheads, one slow dependency can hold every thread in a service.
18. How does service discovery work on Kubernetes?
Through Services and DNS. A Kubernetes Service gets a stable name, such as billing.payments.svc.cluster.local. The cluster routes it to healthy pods behind it.
That replaces client-side registries such as Eureka for most teams. Client-side discovery still matters across clusters, or when the client must choose instances itself, for example for sticky routing.
Security
19. How do services prove who they are to each other?
With mutual TLS. Both sides present certificates, so each knows the other's identity and the traffic is encrypted. Each workload gets its own short-lived identity. SPIFFE defines the format, such as spiffe://prod/ns/payments/sa/billing.
A service mesh or a SPIFFE runtime issues and rotates the certificates, so teams do not manage them by hand. Authorization policies then say which identities may call which services.
The end user's identity still travels separately, usually as a token.
20. What does a service mesh give you, and what does it cost?
It moves network features out of application code: mTLS, retries, timeouts, traffic splitting and metrics for every call. Each team gets them the same way, in any language.
The cost is another system to run and upgrade, extra latency per hop, and a harder debugging path. A handful of services in one language may not need one. Our API gateway guide compares a mesh with a gateway.
21. How do you manage secrets for hundreds of services?
Keep them out of images and Git. Load them at runtime from a secret store, and scope each one to the single service that needs it.
Prefer short-lived credentials that rotate on their own, such as mesh certificates or dynamic database users, over long-lived passwords. Audit who read which secret.
A leaked key that expires in an hour is a much smaller incident than one that never expires.
Operations
22. How do you test a service without starting all the others?
In layers. Unit tests for logic. Integration tests against real dependencies the service owns, such as its database in a container. Contract tests, not live calls, for the services it talks to.
Keep full end-to-end tests to a few critical journeys. A suite that needs 40 services running is slow and fails for reasons unrelated to the change.
23. What must every service have before it goes to production?
Health endpoints for liveness and readiness.
Metrics for request rate, errors and latency.
Structured logs that carry the trace ID.
Traces that join with the caller's.
Alerts tied to an owner, and a short runbook.
A service no one is paged for is a service no one owns.
24. One service is overloaded and the failure is spreading. What do you do?
Stop the spread first. Callers should fail fast with circuit breakers instead of queuing. The overloaded service should shed load: reject excess requests early with 503 or 429, rather than accept work it cannot finish.
Google's SRE book chapter on cascading failures covers the causes, such as retries and resource exhaustion. After recovery, cap the retries and fix the capacity limit that let it spread.
25. How do you release many services safely?
Give each service its own pipeline, and keep every change backward compatible so any service can deploy at any time. Roll out gradually with canary releases, and hide unfinished features behind flags.
Whether the code lives in one repository or many matters less than this rule: no release should need another service to deploy first.
What Changed Recently
Feb 21, 2024
Linkerd 2.15: open-source stable builds end.
Nov 7, 2024
Istio 1.24: ambient mode is generally available.
Feb 27, 2025
Dapr 1.15: Workflow is stable.
Apr 23, 2025
Kubernetes 1.33: sidecar containers are stable.
Sep 30, 2026
AWS App Mesh support ends.
26. What is Istio's ambient mode, and how is it different from sidecars?
Ambient mode runs the mesh without a proxy in each pod. A shared per-node proxy called ztunnel handles mTLS and layer 4 traffic. Optional waypoint proxies add layer 7 features, such as HTTP routing, only for the services that need them.
It became generally available in Istio 1.24 on November 7, 2024. The gains: less memory, and no pod restarts to join or upgrade the mesh. Istio's post says the resource savings can exceed 90% in some cases.
A strong answer notes the trade-off: layer 7 policy now sits in a separate waypoint, not next to the app.
27. What did native sidecar containers in Kubernetes fix?
Start and stop order. A native sidecar is an init container with restartPolicy: Always. It starts before the app containers, keeps running beside them, and stops after them.
Before this, a sidecar proxy could start after the app, so its first calls failed, and a Job never finished because its sidecar kept running. The feature has been on by default since 1.29 and became stable in v1.33.
28. AWS App Mesh ends on September 30, 2026. What should its users do?
Move before the date. According to the App Mesh guide, after September 30, 2026 the console and App Mesh resources can no longer be reached.
AWS's migration post recommends ECS Service Connect for ECS workloads and Amazon VPC Lattice for EKS.
A strong candidate plans the move one service at a time and checks which mesh features, such as retries or mTLS, the new setup still provides.
29. What changed about Linkerd's releases, and why does it matter?
From Linkerd 2.15, the project stopped producing open-source stable release artifacts. Stable builds now come from vendors. The open-source project still ships edge releases.
It matters when choosing a mesh. A team must decide whether to run edge builds, pay a vendor, or pick another mesh. The question tests whether the candidate looks past features to how a tool is released and supported.
30. What does Dapr Workflow offer for long-running processes across services?
Durable orchestration written as ordinary code. A workflow calls activities in other services, waits for events or timers, and survives restarts, because Dapr saves its progress.
The Dapr 1.15 release of February 27, 2025 marked workflow authoring stable.
It suits orchestrated sagas, such as order, payment, then shipping, with compensation on failure. The trade-off, as with Temporal and similar engines, is a new runtime to operate and rules on deterministic workflow code.
Signs of a Strong Answer
They start with reasons not to split, and name a signal that would change their mind.
They draw boundaries around data ownership, not code structure.
They count the retries across layers, and set timeouts that shrink down the chain.
They separate service identity (mTLS) from user identity (tokens).
They know what their mesh or platform does at the network layer, and its support status.