From 142918ac9f602125f693a0b77bc6cb62f52f8be3 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Thu, 7 Jul 2022 08:37:10 -0500 Subject: [PATCH] docs: fixup from cr comments --- website/content/docs/job-specification/template.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/website/content/docs/job-specification/template.mdx b/website/content/docs/job-specification/template.mdx index 305103623..aeeb13081 100644 --- a/website/content/docs/job-specification/template.mdx +++ b/website/content/docs/job-specification/template.mdx @@ -324,15 +324,19 @@ To enable simple load balancing, the `nomadService` function requires 3 argument - The hashing key (should be unique, but consistent per requester) - The service name -By using `NOMAD_ALLOC_ID` as the hashing key, the selected instances will remain mostly -stable for the allocation, even as instances of the service are added or removed. +By using `NOMAD_ALLOC_ID` as the hashing key, the selected instances will remain +mostly stable for the allocation. Each time the template is run, `nomadService` +will return the same set of instances for each allocation - unless N instances of +the service are added or removed, in which case there is a 1/N chance of a selected +instance being replaced. This helps maintain a more consistent output when rendering +configuration files, triggering fewer restarts and signaling of Nomad tasks. ```hcl template { data = <