From ce176f7e09759e7e1d41623e696132bb700e6597 Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Thu, 4 Apr 2024 15:23:38 -0500 Subject: [PATCH] Backport of docs: recommendation for maximum number of template dependencies into release/1.7.x (#20292) Co-authored-by: Tim Gross --- website/content/docs/job-specification/template.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/content/docs/job-specification/template.mdx b/website/content/docs/job-specification/template.mdx index aeb16643f00b..7e593e71b148 100644 --- a/website/content/docs/job-specification/template.mdx +++ b/website/content/docs/job-specification/template.mdx @@ -332,6 +332,18 @@ task "task" { } ``` +### Dependencies + +For templates that read from Vault, Consul, or Nomad, each item read is called a +"dependency". All the `template` blocks share the same internal runner which +de-duplicates dependencies requesting the same item. You should avoid having +large numbers of dependencies for a given task, as each dependency requires at +least one concurrent request (a possibly blocking query) to the upstream +server. If a task has more than 128 dependencies, a warn-level log will appear +in the Nomad client logs which reports "watching this many dependencies could +DDoS your servers", referring to the Vault, Consul, or Nomad cluster being +queried. + ## Nomad Integration ### Nomad Services