How does an orchestrator control interactions between microservices in a workflow?

An orchestrator controls a multi-service workflow by acting as a central coordinator that explicitly tells each microservice what to do and in what order, rather than services reacting to each other's events independently.

Key Points

Example

For an order fulfillment workflow, an orchestrator service calls Payment to charge the customer, waits for success, then calls Inventory to reserve stock, and only after that succeeds calls Shipping to schedule delivery, explicitly driving each step rather than letting services chain off each other's events.

@Service
public class FulfilmentOrchestrator {

    public void fulfil(Order order) {
        Workflow wf = workflows.start(order.id());          // saved state

        step(wf, "PAYMENT", () -> paymentClient.charge(order.id(), order.total()));
        step(wf, "STOCK", () -> inventoryClient.reserve(order.id(), order.items()));
        step(wf, "SHIPPING", () -> shippingClient.schedule(order.id()));

        wf.complete();
    }

    private void step(Workflow wf, String name, Runnable action) {
        if (wf.isDone(name)) return;                       // skip after a restart
        try {
            action.run();
            wf.markDone(name);
        } catch (Exception e) {
            wf.fail(name, e);
            compensator.undoCompletedSteps(wf);             // reverse order
            throw e;
        }
    }
}
// Tools such as Temporal, Camunda or AWS Step Functions provide this
// state handling, retries and timers out of the box.

Interview Tip

A concise interview answer is

An orchestrator is a central coordinator that issues explicit commands to each service in a defined sequence, waiting for each step's outcome before moving to the next. It makes complex workflows easy to follow and debug in one place, at the cost of introducing a critical, central component that needs to be highly available.

Last updated: 1 November 2026

Previous question: What is the Orchestration pattern, and how does it differ from the Choreography pattern?

Next question: What are the advantages and disadvantages of using an orchestrator in microservices?

More Microservices Design Patterns interview questions

All Microservices Design Patterns questions