1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Fly.io Configuration for AllSource Core
# Deploy from monorepo root (Core Dockerfile needs workspace context):
# flyctl deploy --config apps/core/fly.toml --dockerfile apps/core/Dockerfile
# One machine only: .internal resolves to every started machine
# (docs/runbooks/CORE_DEPLOY.md).
= "allsource-core"
= "iad" # US East (Virginia) - change to your preferred region
# Strict archive reads run up to ALLSOURCE_STRICT_ARCHIVE_TIMEOUT_SECONDS (60s);
# the old process must be able to finish them before it is killed.
= 65
# A boot replays the system WAL before it is ready (4m47s on 2026-11-01), and
# /health answers 503 not_ready until then; a shorter wait reports the release
# as failed while the machine is still booting.
[]
= "15m"
[]
= "Dockerfile"
[]
= "allsource_core=info,tower_http=info"
= "::"
# PORT is automatically set by Fly.io
# Sustainable data strategy (Steps 1-6, landed 2026-04-27 — see
# docs/proposals/SUSTAINABLE_DATA_STRATEGY.md). The cache budget is
# eviction target introduced after issue #160 (WAL replay OOM) is
# based on estimated event bytes, not total process RSS. Keep
# headroom for indices, the runtime and archive staging; this soft
# cache limit alone cannot prevent OOM during a cold load.
= "2147483648"
# Admit one strict cold loader at a time on this 8 GiB machine. The
# worker retains its slot after an HTTP timeout until warming actually ends.
= "1"
# The event feed and read models decode a tenant's whole archive. The
# 128 MiB default refused Longhand's control-plane tenant (one 2026-04
# snapshot alone decodes to 149,338,384 B), failing its feed and read
# models on every call. Decoding peaks near 8.25x the text (~6.3 GiB at
# this limit) on this 16 GiB machine; admit_hydration still refuses a load
# the free memory cannot hold.
= "805306368"
= "60"
# Step 6: checkpoint cadence (Parquet flush + WAL truncate). Bounds
# cold-restart replay to ~one minute of writes regardless of how
# large the dataset has grown.
= "60"
# Step 4: per-tenant compaction cadence (default 3600s / hourly is
# also set by code; explicit here so ops can grep fly.toml).
= "3600"
# Step 5: retention for the `system` tenant ONLY — Core's own CP heartbeat
# stream. It reaches no customer tenant: RetentionConfig's default_ttl is
# None and `system` is the single override. Plan-tier retention
# (subscription.go: 7/14/90/365/-1 days) is a Control Plane concept that
# nothing currently enforces.
#
# 0 = keep forever. Unsetting this does NOT disable it — the code default
# is 30 days.
#
# Deliberately off while compaction runs for the first time. The sweep
# never ran before 2026-10-12, so this TTL never ran either, and enabling
# both at once would have the first pass delete ~1.9 GB of heartbeats that
# have never been subject to it. Compaction alone fixes the fragmentation
# behind gh#321. Set this to 30 as a separate, deliberate change — no
# cold-tier archive is configured, so the events are deleted outright.
= "0"
# One-shot flat→tenant Parquet migration (Step 1 / commit bdd3cd8).
# The migrator is idempotent: once the storage tree has no flat files
# at the root, every subsequent boot's pre-Core check is a fast
# directory listing. Safe to leave set permanently — see
# apps/core/docker-entrypoint.sh and
# docs/migrations/STORAGE_LAYOUT_FLAT_TO_TENANT.md.
= "true"
# System checkpoints (docs/runbooks/SYSTEM_CHECKPOINTS.md). A boot loads the
# newest valid checkpoint and replays only the system WAL after it; the WAL
# itself is never pruned. VERIFY compares that checkpoint with a full replay
# in the background 30 s after boot; on a difference it moves every
# checkpoint aside and exits so the restart replays the WAL.
= "true"
= "300"
= "true"
# Core is internal-only (bead t-0ff8). Public ingress removed 2026-04-17.
# All user-facing traffic enters through Control Plane's delegation layer.
# Internal .fly network (http://allsource-core.internal:3900) still works
# because other Fly apps in the same org reach machine IPs directly — no
# [http_service] / [[services]] block is needed. See
# docs/deployment/API_SUBDOMAIN_SETUP.md for the full topology.
#
# Rollback: restore [http_service] and re-allocate a public IPv6 with
# `fly ips allocate-v6 -a allsource-core`.
# Top-level machine orchestration (was nested under [http_service])
= true
= true
= 1
# Internal HTTP health check so auto_stop/auto_start don't kill a healthy
# machine. Runs inside the Fly network; does not expose anything publicly.
[]
= "10s"
= "30s"
= "GET"
= "/health"
= 3900
= "http"
= "5s"
= "http"
# Fly scrapes this every 15s into the org Prometheus behind fly-metrics.net.
# The series carry no tenant label; per-tenant usage comes from the control plane.
[]
= 3900
= "/metrics"
[[]]
# shared-cpu-8x to unlock 16 GiB. On 8 GiB, Core refused to hydrate the
# largest tenant on 2026-10-24 (needed 2,474,258,624 B, 1,969,930,240 B
# available).
= "shared"
= 8
# 2 GiB estimated cache target and one strict archive worker.
# Constrained Linux evidence supports 600,000 rows for the measured
# synthetic shape, not arbitrary concurrent load. See
# docs/evidence/2026-09-27-isolated-archive-capacity/. Do not downsize or
# widen row/worker limits without new headroom evidence.
= 16384
[]
= "allsource_data"
= "/app/data"