Skip to content

Commit

Permalink
Add ADR.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Oct 23, 2024
1 parent 6c86940 commit 2d5a885
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
19 changes: 19 additions & 0 deletions architecture-decisions/0003-one-indexer.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 5 additions & 5 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ if config_env() == :prod do

config :dpul_collections, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")

if System.get_env("INDEXER") do
config :dpul_collections, :start_indexing_pipeline, true
else
config :dpul_collections, :start_indexing_pipeline, false
end
if System.get_env("INDEXER") do
config :dpul_collections, :start_indexing_pipeline, true
else
config :dpul_collections, :start_indexing_pipeline, false
end

config :dpul_collections, DpulCollectionsWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
Expand Down
7 changes: 4 additions & 3 deletions lib/dpul_collections/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ defmodule DpulCollections.Application do

def indexing_pipeline_children() do
cache_version = Application.fetch_env!(:dpul_collections, :cache_version)

[
{DpulCollections.IndexingPipeline.Figgy.IndexingConsumer,
cache_version: cache_version, batch_size: 50},
cache_version: cache_version, batch_size: 50},
{DpulCollections.IndexingPipeline.Figgy.TransformationConsumer,
cache_version: cache_version, batch_size: 50},
cache_version: cache_version, batch_size: 50},
{DpulCollections.IndexingPipeline.Figgy.HydrationConsumer,
cache_version: cache_version, batch_size: 50}
cache_version: cache_version, batch_size: 50}
]
end

Expand Down

0 comments on commit 2d5a885

Please sign in to comment.