Orchestration (computing)
Orchestration is the automated coordination of many computer systems, programs, and tasks so that they work together as one process. Each task may already be automated on its own. An orchestrator links those tasks, runs them in the right order, and handles failures.[1]
One common kind is container orchestration, which manages containers (packages that hold a program and its files) across many machines. In container orchestration, software such as Kubernetes decides which machines run which programs, restarts programs that fail, and adds or removes copies as demand changes.[2]
Automation and orchestration
Automation is the use of software to do a single task without a person stepping in. Orchestration coordinates many automated tasks across several systems into a larger workflow, so the tasks work together toward one goal.[1]
A software release shows the difference. Building the software, running tests, and deploying it (putting it onto servers so people can use it) can each be automated. With orchestration, one code change can start testing in a test environment (a separate setup for trying software before release) and then deploy the updated application to production (the live system people use), as one chain of automated steps.[1]
Orchestration tools differ in what they coordinate.
| Kind | What it coordinates | Examples |
|---|---|---|
| Container orchestration | Containers running across a group of machines | Kubernetes, Docker Swarm, Amazon ECS[2][3][4] |
| Workload orchestration | Containers and programs that do not run in containers | Nomad[5] |
| Workflow orchestration | The steps of a process that calls several services | AWS Step Functions[6] |
| Pipeline and IT process orchestration | Build, test, deploy, and configuration tasks | Jenkins, Ansible Automation Platform[1] |
| Security orchestration | Security tools and incident response steps | SOAR (security orchestration, automation and response) software[7] |
Container orchestration
A container is a package that holds a program with its own files and its own share of the CPU (central processing unit, the processor that runs instructions) and memory. It also has its own view of running processes. Containers on one machine share that machine's operating system, which makes them lighter than virtual machines.[2] See containerization for more.
Container orchestration is what is needed to go from one container on one machine to complex apps made of many containers on many machines, according to Docker. Such apps must stay online through hardware failures and software updates.[8]
A group of machines that work together this way is a cluster. Each machine in it is a node.[9]
What an orchestrator does
The Kubernetes documentation lists the main jobs of a container orchestrator.[2]
- Placement. You state how much CPU and memory each container needs, and the orchestrator fits containers onto nodes to make good use of them. This is a form of the bin packing problem.
- Self-healing. It restarts containers that fail, replaces them, and stops containers that fail a user-defined health check.
- Scaling. It adds or removes copies of an application on command or automatically, for example based on CPU use (see autoscaling).
- Service discovery and load balancing. It gives a group of containers a stable name or address and spreads network traffic across them.
- Rollouts and rollbacks. It replaces old versions with new ones at a controlled rate, and can go back if needed.
- Storage. It mounts storage, such as local disks or cloud storage, into containers.
- Secrets and configuration. It stores passwords, tokens, and keys, and updates settings without rebuilding container images (the stored packages that containers start from).
Kubernetes groups containers into Pods. A Pod is a group of one or more containers that share storage and network resources and are always placed on the same node; it is the smallest unit Kubernetes deploys.[10]
Desired state and control loops
There are two ways to tell a system what to do.[2]
- Give the system a fixed workflow (first A, then B, then C).
- Describe the end result you want, called the desired state, and let the system work out how to get there.
Kubernetes and Docker Swarm both use the second approach, which their documentation calls declarative (see declarative programming).[2][3] Docker Swarm, for example, lets you declare how many copies of each service should run, and its manager adds or removes copies to match.[3]
The control loop
The desired state is kept true by a control loop, a loop that never ends and keeps controlling the state of a system. A room thermostat is one: you set the temperature you want, the room has its actual temperature, and the thermostat switches heating on or off to close the gap.[11]
Google's engineers call this a reconciliation loop and used it in all three of their cluster managers, Borg, Omega, and Kubernetes. Each loop repeats three steps.[12]
- Observe the current state, such as how many copies of a program are running.
- Compare it with the desired state.
- Act to bring the two closer together.
Docker's documentation gives an example. A service is set to run 10 copies, and a machine holding two of them crashes. The manager sees only 8 running and starts two new copies on machines that are still available.[3]
The loop can be sketched in a few lines.
while True:
desired = read_spec() # e.g. 10 copies
current = observe_cluster() # e.g. 8 copies running
if current != desired:
act(desired, current) # e.g. start 2 more copies
Why control loops handle failures well
A program that runs a control loop is called a controller. Controllers cope well with failures because every action is based on what they observe, not on a fixed script. When a controller crashes and restarts, it simply picks up where it left off.[12]
The Kubernetes documentation uses this point to set itself apart from orchestration in a narrow sense. It defines that narrow sense as running a defined workflow (first A, then B, then C).[2]
It describes Kubernetes instead as a set of independent control processes that keep driving the current state toward the desired state.[2] In everyday use, Kubernetes is still called a container orchestration system, including by its own project.[13]
Controllers in Kubernetes
Each Kubernetes controller tracks at least one type of resource. Those objects have a spec field (a written description of the state the object should have), and the controller works to bring the current state closer to it.[11]
Controllers can be layered. For example, one controller keeps the right number of Pods running, while a separate autoscaler only changes that desired number.[12]
Inside a container orchestrator
A Kubernetes cluster has two parts.[9]
- Control plane. It makes global decisions, such as where to place work, and responds to events.
- Worker nodes. They run the application's Pods.
Control plane and nodes
The Kubernetes control plane is split into several components.[9]
- API server. An API is a set of rules that lets programs talk to each other. The API server provides the Kubernetes API and is the front end of the control plane; every other part works through it.
- etcd. A database that stores each value under a named key, keeps the data consistent, and stays available when parts fail. It holds all cluster data.
- Scheduler. It watches for new Pods that have no node yet and picks a node for each.
- Controllers. The control loops described above.
- Kubelet. An agent on each worker node that makes sure the containers described for its Pods are running and healthy.
In production, the Kubernetes control plane usually runs on several computers so that the cluster keeps working if one fails.[9]
Docker Swarm uses a similar split. Manager nodes accept commands and schedule tasks, and worker nodes run the containers the managers send them.[8]
Agreement among managers
When several machines share the job of managing a cluster, they must agree on its state. Docker Swarm managers do this with the Raft consensus algorithm, which requires a majority of managers to agree before a change is accepted.[14] For managers, the quorum and the number of failed managers that the group can survive are
where means rounded down. With 5 managers, and . If 3 of the 5 are down, existing tasks keep running, but the cluster cannot schedule new tasks or move tasks away from failures.[14]
Scheduling
Scheduling is the choice of which machine runs which work (see scheduling). Kubernetes has a default scheduler, kube-scheduler, in the control plane that assigns each new Pod to a node. Custom schedulers can run alongside it or replace it.[9]
Apache Mesos took a different path called two-level scheduling. Mesos decides how many resources to offer each framework (a program such as Hadoop or MPI that runs its own tasks), and each framework decides which offered resources to accept and which tasks to run on them. This mechanism is called a resource offer.[15]
The Mesos paper walks through one offer on a single machine.[15]
| Step | CPUs | Memory | What happens |
|---|---|---|---|
| Free on the machine | 4 | 4 GB | Mesos offers all of it to framework 1 |
| Task 1 | 2 | 1 GB | Framework 1 accepts and runs it |
| Task 2 | 1 | 2 GB | Framework 1 accepts and runs it |
| Leftover | 1 | 1 GB | Can be offered to framework 2 |
Extending orchestrators
Orchestrators are built to be extended without changing their core code.[2] Two common extension points handle storage and complex applications.
- The Container Storage Interface (CSI) is an industry standard for storage plugins (add-on programs that extend another program). It lets a storage vendor write one plugin that works with many container orchestration systems. Its calls cover creating and deleting volumes, attaching and mounting them on nodes, and taking snapshots.[16]
- The operator pattern puts the knowledge of a human operator, who knows how to deploy, run, and repair a service, into software. An operator adds a new kind of resource to Kubernetes and a controller that manages it, for example by taking regular database backups or upgrading an old database version.[17]
Workflow orchestration
Workflow orchestration coordinates the steps of a process that spans several services. AWS Step Functions is one example. Its workflows are state machines whose steps are called states, where a Task state is a unit of work done by another service, and each running workflow is called an execution.[6] General tools of this kind are covered under workflow engines.
Step Functions offers Standard workflows and Express workflows, and Express workflows can run synchronously (the caller waits for the result) or asynchronously (the caller only gets confirmation that the workflow started). The types give different guarantees.[18]
| Standard | Asynchronous Express | Synchronous Express | |
|---|---|---|---|
| How often an execution runs | Exactly once; steps never run more than once unless retries are set | At least once; an execution may run more than once | At most once; it does not restart after an error |
| Longest run time | One year | Five minutes | Five minutes |
| Suited to | Actions that must not repeat, such as processing payments | High-volume event processing, such as streaming data | High-volume event processing, such as app back ends |
Handling failure with compensation
A workflow that changes data in several services cannot simply undo everything at once. Instead, an orchestrator runs compensating steps that reverse earlier steps. This approach is called a saga (see long-running transaction).[19]
AWS describes an order process with three steps: create the order, update the inventory, and take the payment. If the payment fails, the orchestrator runs compensating steps that restore the inventory and remove the order.[20]
Orchestration and choreography
Orchestration is one of two common ways to coordinate services in microservices. In orchestration, a central controller tells each service which step to perform and tracks the state of each step.[19] In choreography, there is no central controller; each service reacts to events published by the others.[21]
The two styles differ in how they handle a single point of failure, meaning one part whose failure can stop the whole process.[20]
| Orchestration | Choreography | |
|---|---|---|
| Coordinator | One central orchestrator | None |
| Single point of failure | The orchestrator can become one[20] | Avoided[19] |
| Tracking and monitoring | Easier end to end[21] | Harder as services are added[21] |
| Good fit | Many steps, retries, and timeouts[21] | Few services and simple flows[19] |
Security orchestration
Security orchestration applies the same idea to defending computer systems.
Security orchestration, automation and response (SOAR) software connects separate security tools, automates repeated tasks, and coordinates how a team responds to threats.[7] IBM credits the analyst firm Gartner with first using the term SOAR, in 2015.[7]
Gartner lists playbooks among SOAR features. Repeatable automated tasks are turned into playbooks, and Gartner lists these related features.[22]
- Playbooks can run alone or join into larger workflows.
- Tasks can be started by hand or by automatic triggers.
History
Large-scale orchestration grew out of cluster managers built inside large companies and universities. The timeline below uses CNCF for the Cloud Native Computing Foundation, the group that oversees Kubernetes.[13]
Google's Borg
Borg was the first Google system to manage two kinds of work in one place. These were long-running services and batch jobs (tasks that run to completion), which two earlier systems had handled separately. Sharing machines between them raised machine use and cut costs.[12]
A 2015 paper described Borg running hundreds of thousands of jobs across clusters of up to tens of thousands of machines each. It drew on a decade of operation.[23]
The paper credits Borg's high machine use to four methods.[23]
- Admission control, deciding whether new work can be accepted with the resources available.
- Tight packing of tasks onto machines.
- Over-commitment, giving out more resources than the machines physically have.
- Sharing machines between different workloads.
Google's Omega
Omega, a later Google system, kept the state of the cluster in a central store. Many separate components read and wrote that store directly.[12]
Many of Omega's ideas, including running more than one scheduler, were later folded back into Borg.[12]
Mesos
Mesos was presented at the USENIX NSDI conference in 2011 by Benjamin Hindman and seven co-authors.[15] It became a top-level Apache project in June 2013 and was retired in August 2025.[24]
Kubernetes
Kubernetes moved from Google into a shared open project over a few years.
- 21 July 2015. Kubernetes 1.0 was announced, together with plans to form the CNCF to govern it.[13]
- 10 March 2016. The CNCF accepted Kubernetes.[26]
- 6 March 2018. Kubernetes reached the CNCF's top maturity level, Graduated.[26]
Unlike Borg and Omega, Kubernetes is open source.[12]
Unlike Omega, which let components read and write its store directly, Kubernetes sends all access to stored state through a central API server. That server checks and versions each change.[12]
Docker swarm mode
At DockerCon on 20 June 2016, Docker announced that version 1.12 would build swarm-mode orchestration into the Docker Engine itself.[27]
Managed services
Cloud providers now run orchestrators as services, so users do not manage the control plane themselves.
- Amazon ECS is a fully managed container orchestration service from AWS.[4]
- Amazon EKS is a fully managed Kubernetes service from AWS.[28]
- Google Kubernetes Engine (GKE) is a managed version of Kubernetes in which Google Cloud runs the control plane. In its Autopilot mode, Google Cloud also manages the worker nodes.[25]
Comparison of tools
Orchestration tools differ in what they run and who operates them.
| Tool | What it runs | Notable design point |
|---|---|---|
| Kubernetes | Containers, grouped into Pods | Many independent controllers around a central API server[11][9] |
| Docker Swarm | Docker containers | Built into Docker Engine; managers agree through Raft[3][14] |
| Nomad | Containers and programs not in containers | One self-contained program with no external services for storage or coordination[5] |
| Apache Mesos | Frameworks such as Hadoop and MPI | Two-level scheduling through resource offers; retired in 2025[15][24] |
| Amazon ECS | Containers on AWS | AWS runs the control plane[4] |
| AWS Step Functions | Workflows of service calls | State machines with Standard and Express types[6] |
References
- What is orchestration?, Red Hat.
- Overview, Kubernetes Documentation.
- Swarm mode, Docker Docs.
- What is Amazon Elastic Container Service?, AWS Documentation.
- What is Nomad?, HashiCorp Developer.
- What is Step Functions?, AWS Documentation.
- What is SOAR (security orchestration, automation and response)?, IBM.
- Docker 1.12: Now with Built-in Orchestration!, Docker Blog, 2016.
- Cluster Architecture, Kubernetes Documentation.
- Pods, Kubernetes Documentation.
- Controllers, Kubernetes Documentation.
- Borg, Omega, and Kubernetes: Lessons learned from three container-management systems over a decade, ACM Queue, 2016.
- Kubernetes V1 Released: Cloud Native Computing Foundation to Drive Container Innovation, Google Cloud Platform Blog, 2015.
- Raft consensus in swarm mode, Docker Docs.
- Mesos: A Platform for Fine-Grained Resource Sharing in the Data Center, USENIX NSDI, 2011.
- Container Storage Interface (CSI) specification, CSI project, GitHub.
- Operator pattern, Kubernetes Documentation.
- Choosing workflow type in Step Functions, AWS Documentation.
- Saga design pattern, Microsoft Azure Architecture Center.
- Saga orchestration pattern, AWS Prescriptive Guidance.
- Saga choreography pattern, AWS Prescriptive Guidance.
- Security Orchestration, Automation and Response Solutions, Gartner Peer Insights.
- Large-scale cluster management at Google with Borg, Google Research (EuroSys), 2015.
- Apache Mesos, The Apache Attic.
- GKE overview, Google Cloud Documentation.
- Kubernetes, Cloud Native Computing Foundation.
- Docker 1.12 will ship with built in DevOps orchestration, SiliconANGLE, 2016.
- What is Amazon EKS?, AWS Documentation.
