Microservices Interview Questions and Answers

Microservices interviews are about trade-offs, not definitions. You should be able to say when a monolith is the better choice, how to draw service boundaries around business capabilities, and what you pay for the split: network failures, data consistency, versioning and operational overhead.

Expect the standard toolkit: synchronous versus asynchronous communication, the API gateway, service discovery, the circuit breaker, retries with backoff, bulkheads, the saga pattern for distributed transactions, idempotency, distributed tracing and centralised logging. These answers explain each one with its failure mode.

Questions

Related

Frequently asked questions

When should you not use microservices?

When the team is small, the domain is still changing, or you cannot invest in deployment, monitoring and testing automation. A well-structured monolith is often faster to build and easier to run.

How do you handle a transaction across services?

Avoid it by design where you can. Otherwise use the saga pattern: a sequence of local transactions with compensating actions, coordinated by choreography (events) or orchestration (a coordinator).

What is a circuit breaker?

A guard around a remote call that stops calling a failing service after repeated errors, fails fast, and tries again after a cool-down so the failure does not cascade.