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: • The orchestrator holds the workflow logic and sends commands to each service, waiting for a response before deciding the next step. • This centralizes control, making the sequence of a complex process easy to see, monitor, and modify in one place. • Each participating service stays simpler because it doesn't need to know about the overall workflow, only how to handle the command it receives. • The orchestrator itself becomes a critical component, so its availability and scalability need to be carefully designed to avoid a single point of failure. • Tools like Camunda, Temporal, or a custom Spring Boot orchestrator service are commonly used to implement this role.
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.
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."