diff --git a/architecture-decisions/0003-one-indexer.md b/architecture-decisions/0003-one-indexer.md new file mode 100644 index 00000000..f3b8c802 --- /dev/null +++ b/architecture-decisions/0003-one-indexer.md @@ -0,0 +1,19 @@ +# 3. Record architecture decisions + +Date: 2024-10-23 + +## Status + +Accepted + +## Context + +We're using Broadway for indexing, which has no built in concept of multi-machine distributed indexing. Right now we're unsure we need to scale past one machine for indexing our documents. + +## Decision + +We will use one special machine that can be scaled independently to have more resources for indexing. + +## Consequences + +If we need to distribute indexing later, and can't just add resources to the one machine, then we'll have to develop a way for Broadway to distribute. diff --git a/config/deploy/staging.hcl b/config/deploy/staging.hcl index abf741ae..bd5d2a2e 100644 --- a/config/deploy/staging.hcl +++ b/config/deploy/staging.hcl @@ -19,12 +19,14 @@ job "dpulc-staging" { auto_revert = true } group "web" { - count = 1 + count = 2 network { port "http" { to = 4000 } } service { port = "http" + name = "dpulc-staging-web" + tags = ["frontend"] check { type = "http" port = "http" @@ -69,6 +71,57 @@ job "dpulc-staging" { ports = ["http"] force_pull = true } + # Doesn't take much just to run a webserver. + resources { + cpu = 2000 + memory = 1000 + } + template { + destination = "${NOMAD_SECRETS_DIR}/env.vars" + env = true + change_mode = "restart" + data = <