ARTICLE

Components of an Orchestrator

From Build an Orchestrator in Go by Tim Boring

  • The evolution of application deployments
  • Classifying the components of an orchestration system

Introduction

The (Not So) Good ‘Ole Days

Figure 1. This diagram represents a slice of Michelle’s world in 2002. The top image is a view of the rack in which her servers live. The bottom image is a view of those machines from the perspective of the operating system. Both views show the diversity that administrators dealt with across physical hardware and operating systems.

What is an orchestrator?

The components of an orchestration system

  • The task
  • The job
  • The scheduler
  • The manager
  • The worker
  • The cluster
  • The CLI

The Task

  1. The amount of memory, CPU, and disk it needs to run effectively
  2. What the orchestrator should do in case of failures, often called restart_policy
  3. The name of the container image used to run the task

The Job

  1. Each task that makes up the job
  2. Which data centers the job should run in
  3. The type of the job

The Scheduler

  1. Determine a set of candidate machines on which a task could run.
  2. Score the candidate machines from best to worst.
  3. Pick the machine with the best score.

The Manager

  1. Accept requests from users to start and stop tasks.
  2. Schedule tasks onto worker machines.
  3. Keep track of tasks, their states, and the machine on which they run.

The Worker

  1. Running tasks as Docker containers.
  2. Accepting tasks to run from a manager.
  3. Providing relevant statistics to the manager for the purpose of scheduling tasks.
  4. Keeping track of its tasks and their state.

The Cluster

CLI

  1. Start and stop tasks
  2. Get the status of tasks
  3. See the state of machines (i.e. the workers)
  4. Start the manager
  5. Start the worker
Figure 2. The components of an orchestration system. Regardless of what terms different orchestrators use, each has a scheduler, a manager, a worker, and they all operate on tasks.
Figure 3. Google’s Borg. At the bottom are a number of Borglets, or workers, which run individual tasks in containers. In the middle is the BorgMaster, or the manager, which uses the scheduler to place tasks on workers.
Figure 4. The Kubernetes architecture. The control plane, seen on the left, is equivalent to the manager function, or to Borg’s BorgMaster.
Figure 5. Nomad’s architecture, as it appears sparser, still functions similar to the other orchestrators.

Why implement an orchestrator from scratch?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manning Publications

Follow Manning Publications on Medium for free content and exclusive discounts.