count = 1. As load increased—and a customer uploaded a 2 GB spreadsheet—Maya iterated the spec to handle scaling, resource reservation, service discovery, secrets, and debugability. We’ll step through those concerns in order.
-
Scaling
- The task count grew from one to three to handle the larger uploads. Scaling in Nomad is controlled by the job’s
count(orscalefor other drivers) and the scheduler places allocations across the cluster.
- The task count grew from one to three to handle the larger uploads. Scaling in Nomad is controlled by the job’s
-
Resource reservation
- Maya added CPU and memory in the task’s
resourcesblock to reserve capacity for each allocation. If you over-provision, you waste cluster resources; if you under-provision, the OS or container runtime can kill the process. Choose conservative values, then adjust after profiling.
- Maya added CPU and memory in the task’s
-
Discovery and health checks
- With three copies running, the frontend relied on a hard-coded address and failed for two of the instances. A
servicestanza registers a logical name in service discovery so other components look up a friendly name instead of an IP. - Inside
serviceyou can add acheckto report health. A discovery consumer (for example, a load balancer or Consul) must respect that health status or it may route traffic to unhealthy instances.
- With three copies running, the frontend relied on a hard-coded address and failed for two of the instances. A

Health checks are valuable beyond restart policy: they help discovery systems and controllers avoid routing traffic to unhealthy tasks. When integrating with a provider such as Consul, ensure both registration and health checks are present and consumers respect the check status.
service stanza with an HTTP health check:
- Secrets and identity (Vault integration)
- A database password had been stored in the repository for two years. To fix this, Maya added a Vault integration to the job. The Nomad
vaultstanza contains the role/policy information; Nomad and Vault use the allocation’s identity to authenticate and determine which secrets the task can read. - A
templatestanza consumes those secrets and renders them into the allocation as environment variables or files on the allocation’s ephemeral filesystem. This avoids long‑term storage of secrets on the host.
- A database password had been stored in the repository for two years. To fix this, Maya added a Vault integration to the job. The Nomad
- Debuggability and the allocation vs job distinction
- One allocation entered a crash loop while the job still reported healthy. This highlights an important distinction:
- The job declaration is the promise—what should run.
- An allocation is what actually ran on a node.
- To debug failures:
- Inspect allocation status.
- Fetch allocation logs (stdout/stderr).
- If needed, open a shell inside the allocation.
- One allocation entered a crash loop while the job still reported healthy. This highlights an important distinction:
network stanza maps a port label (such as http), Nomad picks host ports for dynamic mappings, the allocation environment exposes that mapped port to the task, and the service stanza registers that port for discovery. Everything—runtime, discovery, and health—reads the same port label.

In short: Tidepool’s job file controls scaling, discovery, secret access, and debuggability. That leaves two open questions to address going forward:
- Why does changing a single number (for example an upload limit or a timeout) still require a rebuild or a full deploy?
- Why are Maya and Sam the only people who can answer the question, “What is running right now?”
- Nomad documentation: https://www.nomadproject.io/docs
- Consul documentation: https://www.consul.io/docs
- Vault documentation: https://www.vaultproject.io/docs
- HashiCorp Learn and certification courses (example): https://learn.kodekloud.com/