Installation guide · Several servers
Several servers
Run one install on several servers that share one queue, with what each needs and its settings.
One Sequences install can run on several servers that share one queue. One server, the coordinator, holds the pages, sign-in, the queue and every result, as a single server does. The others are workers: each takes the coordinator's searches of a snapshot, runs them and sends the results back, and the coordinator checks every result before the search completes. People use the coordinator's address as before. A worker has no page and no public port, reads no license file and keeps no audit log. BIOSEQUENCE_ROLE sets each server's part: single, the default, coordinator or worker. Several servers need 0.81.0 or later, the same release on every server.
Workers help when searches of a snapshot wait for each other: many people searching at once, case runs with many searches, or batches from programs. Each worker runs up to BIOSEQUENCE_CONCURRENCY searches at once, on its own CPUs and memory. On one server with CPUs to spare, BIOSEQUENCE_CONCURRENCY=2 or more runs searches side by side with nothing more to set up. Only searches of a snapshot go to workers. Searches of an attached database, Align exactly, antibody numbering, multiple alignments, portfolio exports and result files imported into a case run on the coordinator.
A coordinator keeps its searches of a snapshot through a restart: a waiting search keeps its place, and a search the coordinator ran itself starts again. A search a worker runs goes on if the worker reaches the coordinator within a minute of the coordinator's start, and otherwise waits in the queue again. The coordinator's other work ends at a stop, as on a single server. The time a combined search or a case run has left counts the searches the workers run.
Measured with the November 13, 2026 snapshot on release 0.92.0, in the load test of Searches an hour, with every server on one 32-CPU host and each on CPUs of its own: each worker 6, which are 3 cores, and the coordinator 2, running no search. With 100 searches at once, two workers ran 552 searches an hour and three ran 828. With 20 at once, two and three workers took 120 and 97 seconds, where a single server with 8 CPUs, running one search at a time on 6 threads, took 198. Each search took longer on a worker's 3 cores, but two or three ran at once. When a worker was killed, stopped or frozen in the middle of a search, or the coordinator's service was killed or frozen, all 20 searches still completed, each once, and a search cut off on a worker started again on another. Their hits matched the other runs of each query. Smith-Waterman searches estimate their E-values from a random sample, so the rows nearest their E-value cut can differ a little between any two runs, with or without a failure.
What each server needs
- The coordinator runs with sign-in on, the license file and the snapshots and deltas, as a single server does. See Sign-in on: your organization. At
BIOSEQUENCE_CONCURRENCY=0it runs no search of a snapshot itself, so it needs fewer CPUs than a worker. It keeps one slot for the work that stays on it. - Each worker runs the coordinator's image and holds the same snapshots and deltas in its own data volume, loaded from the same copies, with the same paper folder and taxa folder if the coordinator has them. It needs no license file, no sign-in settings and no published port.
- Every server has the worker key: one random value of 32 characters or more, the same on all of them. Anyone with the key can take searches and read their queries, so keep it as safe as the client secret. To change it, start every server again with the new key.
- Give every worker the same CPUs, memory and
BIOSEQUENCE_THREADS. The coordinator's time estimates follow the last search on any server, and workers of one size keep them steady.
Load each new snapshot or delta on every worker first, then on the coordinator. People search what the coordinator lists, and at BIOSEQUENCE_CONCURRENCY=0 a search waits until a worker holds its copy. The coordinator and its workers look at their copies every minute, so a new copy takes searches within a minute, with no restart.
Before a worker takes a search, the coordinator checks that it runs the same release, the same search programs and the same paper and taxa folders. It also compares the SHA-256 list of each snapshot and delta the worker holds with its own, and gives the worker only searches of the snapshots and deltas that match. load keeps the list it checked each file against, so a copy it loaded is ready at once. A snapshot built on the server, or copied in any other way, is read whole at the first start, which can take minutes for a large one. verify stays the full check of a copy. A worker uses the coordinator's time limit for one search and its largest result file (BIOSEQUENCE_JOB_SECONDS, BIOSEQUENCE_MAX_OUTPUT_BYTES), with its own threads.
Settings for several servers
| Setting | Where | Default | What it does |
|---|---|---|---|
BIOSEQUENCE_ROLE | Every server | single | single, coordinator or worker. Any other value stops the start. A coordinator needs sign-in on |
BIOSEQUENCE_WORKER_KEY_FILE | Every server | none | A file that holds the worker key, such as /config/worker.key. BIOSEQUENCE_WORKER_KEY takes the key itself instead. The key is never printed or logged |
BIOSEQUENCE_CONCURRENCY | Every server | 1 | On a worker, the most searches it runs at once, 1 to 16. On the coordinator, 0 to 16: at 0 its workers run every search of a snapshot, and above 0 it runs that many itself beside them |
BIOSEQUENCE_WORKER_BIND | Coordinator | 127.0.0.1 | The address inside the container where the worker port listens. 0.0.0.0 for workers on the coordinator's Docker network or on other hosts |
BIOSEQUENCE_WORKER_PORT | Coordinator | 8766 | The worker port, 1024 to 65535, other than BIOSEQUENCE_PORT |
BIOSEQUENCE_WORKER_TLS_CERT, BIOSEQUENCE_WORKER_TLS_KEY | Coordinator | none | A PEM certificate and its private key, which turn on TLS on the worker port. Set both or neither |
BIOSEQUENCE_COORDINATOR_URL | Worker | none | The coordinator's worker address with no path, such as https://coordinator.example.org:8766. http:// works only for the same machine or a one-word host on the same Docker network, such as http://sequences:8766 |
BIOSEQUENCE_WORKER_NAME | Worker | the container's ID | The name the coordinator's log and the usage page show: 1 to 63 letters, digits, dots, dashes or underscores, starting with a letter or digit. Each worker needs its own |
A setting that is missing or does not fit stops the start, before the data volume opens, with a message that names it. The coordinator's audit log notes the settings of each start, with the keys shown as set.
Guide version 1.63.0 · For Sequences 0.155.0