From a71632e3a42fb428d60587ccde274d933a94d9b2 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Thu, 4 Apr 2024 11:08:49 -0400 Subject: [PATCH] docs: recommendation for maximum number of template dependencies (#20259) --- 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