CrushMFT Documentation

The standby orchestrator and the job server#

The orchestrator is the part that decides which run goes where and keeps the schedules. On an ordinary server it is inside the server and needs no thought. This page is for installations where jobs must go on when a machine fails, or where jobs get machines of their own.

A job server#

A job server is CrushMFT started to run jobs and nothing else. It serves no file transfers.

java -jar CrushMFT.jar -JOBS
A job server
starts only the HTTP and HTTPS ports of its list of ports. FTP, SFTP, SMB, NFS and the others stay in the settings and are not started.
shows the Jobs app with its Engines section, and the admin pages
is for admins. Give it admin users only.
needs an Enterprise licence, as jobs do

Use one to keep jobs apart from the file servers: the file servers in front, a job server behind them that fetches, converts and delivers.

A standby#

Two job servers, or two servers, can share one jobs folder on a disk both reach. One is active; the other stands by and takes over when the first one ends.

On the second:

Server setting Value
job_orchestrator_standby true

How it works:

  • The active orchestrator holds a lock on a file in the jobs folder, active.lock. As long as its process lives, the lock is held.
  • The standby tries for the lock once a second. It runs nothing meanwhile, and says so: a job started there is refused with "this job orchestrator is standing by", and its Engines section is empty.
  • When the active process ends, the system lets the lock go, the standby gets it, and within about a second it is the active one: it reads the record of runs, waits for the engines to report what they hold, and goes on placing runs and firing schedules.
  • Engines find whichever one is active. An engine on the same machine reads the address again at each try; an engine elsewhere can be given both addresses.
  • Runs that were under way stay with their engines. Engines keep working while no orchestrator answers and report when one does. Nothing is started twice.

A second orchestrator on the same folder without the standby setting refuses to start: "another orchestrator is active on this store". Two writers would spoil the record of runs.

When the first machine is back, start it with the standby setting: it is now the one that waits. There is no "preferred" one.

What a standby needs:

  • One jobs folder for both, on a disk that keeps file locks honest. A plain network share does on most systems; test it by stopping the active one once.
  • The same version on both.
  • The same settings for what jobs use: mail, keys, connection profiles. In a cluster that is the case by itself: see Jobs in a cluster, where the standby is built in.

An orchestrator of its own#

The orchestrator can also be a process of its own, outside every server:

java -jar CrushMFT.jar -JOB_ORCHESTRATOR <folder>

The first start writes orchestrator.conf into the folder with its defaults: the servers that may use it, the jobs folder, whether it starts an engine of its own, its port, and whether it is a standby. It writes its log there too.

Each server then connects to it as a host, with the server setting job_orchestrator_addr, and hands it its runs. Several servers can share one orchestrator and its engines this way without being a cluster. A run's needs of its server (sending mail, reading a user) are answered by the server that started it.

This is the shape for the largest installations. Most never need it: one server has its orchestrator inside, and a cluster keeps one on its master.

The shapes side by side#

Shape Orchestrator Engines For
one server in the server on the server nearly everybody
a server and engines elsewhere in the server on the server and on other machines taking work off the server, or working behind a firewall
a cluster on the cluster's master, moving with it one per server high availability with the file servers
job servers with a standby in the active job server theirs, and others jobs kept apart from file transfer
an orchestrator of its own a process of its own, with a standby if wanted any several servers sharing engines

What was tried#

On test servers on one machine: a job server started with -JOBS opened its web port and not its SFTP port and ran a job. A second server on the same jobs folder stood by and refused a start. A run of 45 seconds was started on the first; the first server's process was killed; the second took over about a second later, and the run went on and completed once. An orchestrator of its own was started in a folder, a server connected to it as a host, and a job started on the server completed.

Not tried: two real machines with a shared disk between them.