CrushMFT Documentation

Jobs in a cluster#

In a cluster of CrushMFT servers, jobs are run by the cluster as a whole: a job is started once, on one server, whichever server is asked. There is nothing to set up for it. This page says how it works and what changed from CrushFTP 11.

The shape#

  • One orchestrator for the cluster. It runs on the cluster's master: the server that holds the shared address (ServerBeat).
  • Every server brings an engine. Each other server joins the master over the cluster's own link and starts a job engine. No enrolment code is needed: the servers of a cluster know and trust each other already.
  • Runs are placed on any engine, by room, labels and names. A run that a user's upload starts on server B may execute on server A.
  • Schedules belong to the master. Only the master fires them. A job that is due at 2:00 runs once, not once per server.
  • A run's needs go to the server that started it. A task that sends mail through the server's settings, or reads a user, asks the server on which the run was started.

The Engines section of the Jobs app shows the same on every server: all engines of the cluster, each with Kind saying which server it is.

When the master changes#

When the shared address moves to another server, every server notices within about 5 seconds:

  • the new master starts the orchestrator and takes the schedules;
  • the others leave the old one and join the new one;
  • runs under way save their place and go on, on the engines that are left.

A server that cannot join yet, because the new master is not ready, runs its own jobs itself in the meantime and tries to join again every minute.

So the cluster has the standby built in: any server can become the one that holds the orchestrator.

One at a time#

A job with Single instance only ticked runs once at a time in the whole cluster, because the one orchestrator sees every run. A start while it runs is refused, on whichever server it was asked.

Single server only, the second box in a job's Setup, now means the same. It is kept so that jobs from CrushFTP 11 need no change.

Sending a job to a certain server#

Give the servers' engines labels, or use their names, and choose in the job's Setup: Run on engines with labels or Run on the engine named. See Engines on other machines.

Use this for a job whose files are on one server's own disk. Jobs that only use shared storage or other servers need not care where they run.

A Link task can also run a job on the other servers of the cluster.

What all servers must share#

  • The jobs. The jobs folder is kept the same on all servers by the cluster, or is on a disk all servers share.
  • What jobs use: connection profiles, keys, mail settings. These are part of the settings the cluster keeps in step.
  • The paths. A job that reads file:///data/in/ needs that path on every server whose engine may run it, or a label that keeps it on the one that has it.

Settings#

Server setting Is Unless you change it
job_cluster_orchestrator the cluster runs jobs as described here. false: each server runs its own jobs by itself. true
job_engine_remote_port the port the master's orchestrator listens on for the other servers' engines. Empty: a free port is chosen. empty

Coming from CrushFTP 11#

Three settings of version 11 are gone or changed:

In 11 In 27
single_job_scheduler_serverbeat: only the ServerBeat master schedules jobs always so. The setting is gone.
distributed_jobs: spread runs over the servers always so. The setting is gone; the orchestrator places runs on all engines.
Single server only on a job: the servers ask each other whether the job runs the same as Single instance only

A cluster that was set up for 11 needs no change for its jobs.

What was tried#

On a test rig with two servers' parts on one machine: both joined without a code; a run started on the second server ran on its engine, with its job taken from that server and its mail sent through it; a run started on the master ran on the second server's engine; a single-instance job running from the master was refused on the second; the master's schedules fired on the master only; and when the second server stopped, its run went on on the master's engine.

Not tried: a cluster of two real servers on two machines.