No one design pattern is "the" pattern used in microservices; architects combine several patterns—most characteristically per-service databases, API gateways, service discovery, and asynchronous messaging—chosen to fit each service's boundaries and failure modes. The question implies a single answer, so the important ambiguity is that "microservices" names an architectural style, not one pattern, and the phrase "design pattern" spans at least three different pattern catalogs: object-oriented design patterns (Gang of Four), enterprise application patterns, and distributed-systems/deployment patterns. Which one is meant changes the answer.
Why the question has no single answer
A microservices architecture is a way of decomposing an application into independently deployable services organized around business capabilities. Patterns are recurring solutions to problems within that style. Different problems—inter-service communication, data consistency, discovery, resilience, deployment—each have their own solutions. So a correct answer lists the recurring patterns and explains the problem each solves, rather than naming one.
It also helps to distinguish layers where "pattern" is used:
Code-level (Gang of Four): Factory, Strategy, Observer, Adapter. These apply inside any service; they are not specific to microservices. Enterprise integration: Publish–Subscribe, Message Router, Idempotent Consumer. These describe how services exchange messages. Microservice/distributed-system patterns: Database per Service, API Gateway, Saga, Circuit Breaker, Service Registry. These are the patterns people usually mean when they ask this.
Conflating these layers is the main source of confusion.
The defining pattern: Database per Service
If one pattern most distinguishes microservices from a monolithic or service-oriented design, it is Database per Service. Each service owns its data store and exposes it only through its API; other services cannot read its tables directly. This preserves loose coupling and independent deployability.
The consequence is that you lose easy cross-service joins and ACID transactions across services. That gap is what produces the next cluster of patterns.
Patterns for data consistency: Saga and friends
When a business operation spans several services, you cannot rely on a single database transaction. The Saga pattern models the operation as a sequence of local transactions, each publishing an event or message that triggers the next step, with compensating transactions to undo prior steps if a later one fails.
For example, an order workflow might reserve inventory, charge payment, and create a shipment. If payment fails, the inventory reservation is released by a compensating action. This is eventual consistency, not atomicity. Related patterns include:
Transactional Outbox: write the event to an outbox table in the same local transaction as the state change, then relay it, avoiding lost or phantom messages. Event Sourcing: persist state as an ordered log of events rather than only the current snapshot; useful when audit history matters, but adds complexity. CQRS (Command Query Responsibility Segregation): separate write and read models, often paired with event sourcing.
These are choices, not requirements; a simple service may need none of them.
Communication patterns
Synchronous calls (HTTP/REST, gRPC) are simple but couple availability: if the callee is down, the caller may fail too. Asynchronous messaging (queues, publish–subscribe) decouples services in time and is common for event-driven microservices.
API Gateway: a single entry point that routes requests, handles authentication, and aggregates responses, so clients do not call every service directly. Backend for Frontend (BFF): a gateway tailored per client type (web, mobile). Service Discovery / Service Registry: lets services find each other's network locations dynamically as instances scale or move. Idempotent Consumer: ensures a redelivered message is processed only once in effect.
Resilience patterns
Distributed systems fail partially. Common resilience patterns include:
Circuit Breaker: stop calling a failing dependency after a threshold, fail fast, and probe for recovery. Retry with backoff and timeout: handle transient failures without hammering a struggling service. Bulkhead: isolate resources so one failing dependency cannot exhaust all capacity. Sidecar / Service Mesh: move cross-cutting concerns (retries, mTLS, telemetry) into a proxy alongside each service.
Deployment and structural patterns
Strangler Fig: incrementally migrate a monolith by routing slices of traffic to new services. Sidecar, Ambassador, Adapter: helper-process patterns often realized in service meshes. Backends for Frontends and Service per Team reflect organizational structure (Conway's Law). Decomposition patterns such as decompose by business capability or by subdomain (aligned with Domain-Driven Design bounded contexts).
A concrete illustration
A retail system might use Database per Service (each of catalog, orders, payments owns its store), an API Gateway for clients, Saga with compensating actions for checkout, Transactional Outbox to publish order events reliably, a Circuit Breaker around the payment provider, and Service Discovery for internal routing. No single pattern "is" the microservices pattern; this combination solves distinct problems.
Where the answer stops applying
These patterns assume a genuinely distributed deployment with independent services—overkill for a small application, where a modular monolith is often preferable. Some patterns (Event Sourcing, CQRS) add substantial operational cost and are frequently misapplied. Cloud vendors and frameworks sometimes brand particular combinations, but the underlying patterns are cataloged independently of any product.
FAQ
Is API Gateway the main microservices pattern? It is a common edge pattern, but it addresses only client-to-service routing, not data consistency, discovery, or resilience.
Are Gang of Four patterns used in microservices? Yes, inside individual services, but they are general object-oriented patterns, not specific to the style.
Is there a canonical list? Catalogs such as Chris Richardson's Microservices Patterns and the Azure Architecture Center organize these by problem; treat any list as a menu, not a mandate.