Nomad Introduction Features and Use Cases Examples

Last Update

Executive Summary

Nomad is an open source system developed by HashiCorp.

Nomad Features

Execute a Long Running Process

Nomad provides an interface that takes a declarative description of one or multiple task (e.g. you can describe a web application that should be executed) and takes over the burden to ensure that the tasks are executed on a machine in the Nomad cluster. One type of these jobs are log running processes, which are processes that are intended to run until someone instructs Nomad to stops them.

When specifying tasks you can also specify how much resources a specific tasks requires. For example you can say that your job needs 200 Mhz CPU, 200 MB disc space, 265 MB RAM, 50 mbits and two network ports for opening listen sockets. You can also say that you want to execute a task x times in parallel.

Often (or always) a process has some dependencies that must be in place when it should be started. For example the executable file of the process itself must be on the machine where it should be executed. Other examples are shared libraries that are required to start a process. To solve this, Nomad provides a way to specify a Docker container for each job. A docker container contains everything that is required to run the process and you can build the container by your self on your local machine.

Things I don't understand yet:

  • What happens when the process fails, does Nomad restart it?
  • What happens when the process needs a specific piece of data that is only available on one or on a few nodes. Does Nomad provide a scheduling constraint to support this?
  • What about authorization: When I start a job, can someone else stop the job?
  • What happens when a Nomad node fails, are the jobs replaced to other Nomad nodes?
  • How does a failed Nomad node gets reintegrated into the Cluster and who does that?
  • When I run multiple instances of a web sever and a load balancer, how does the load balancer know where the web servers are currently running?

Execute an One-Off Task

In contrast to log running processes, one-off tasks are tasks which are completed at some point in time. For example analytics tasks like calculating the turnover in the last month.

Things I don't understand yet:

  • What happens when the one-off task fails during the execution, does Nomad restart it?

Nomad Use Cases

Operating a Microservice Architecture

The advantage of microserivces (decreasing complexity during development) comes with the trade-off that the complexity of the operation increased. Using technologies like Nomad the complexity of operations can be subdued.