Bulk COLA Runs — Scaling & Operations
For an operator enabling or sizing the October-COLA bulk redetermination runs
(ADR-002 Amendment 1 and Amendment 3). The archived
#1213 program plan
carries the design and the B/C/H labels this page used to quote. Settings live
in BulkSettings (services/canopy-eligibility/src/bulk/config.rs); every
figure below is a default there unless another file is named.
Preconditions
-
Deploy order — snap fleet first, then eligibility. snap ships the fail-closed attestation writer (
attestation_disabled,services/canopy-snap/src/api/determine_policy.rs) and the trigger emission; only then setCANOPY_ELIGIBILITY__BULK_RUNS_ENABLED=true(bulk_runs_enabled,services/canopy-eligibility/src/config.rs). During a rolling snap restart an old replica lacks the guard: its unattested write is caught by the orchestrator’s post-verify binding (provenance_rejected,bulk/arm.rs) and recovered by adopt-or-skip once the fleet settles. -
Boot requirements (fail-closed:
BulkSettings::resolveandvalidate_environment).renewals_urlandrules_urlset; snap in the program registry;db_max_connections ≥ 2K+4(the per-replica total isdb_max_connectionsplus the 2K+2 bookkeeping pool). -
CANOPY_MQ_PREFETCH_COUNT=1on every eligibility replica, enabled or not. Thedetermination.requestedconsumers attach on every boot. An absent value is the 32 default, and0or garbage refuses the boot outright (canopy_mq::MqTuning, #2578). Boot refuses any prefetch but 1 (validate_consumer_environment, which checks the subscriber’s own value).
Steps
-
Grant the broker ACL. Give the eligibility broker user topic-write on
canopy.eventsusing thecanopy-eligibilityuser’swriteregex fromdevstack/rabbitmq/definitions.json— copy the whole pattern, never a subset: it also coversdetermination.order_failedandeligibility.cross_program_alerts.accessed, and a shorter regex makes the brokerACCESS_REFUSEthose publishes. -
Pre-declare the queue.
canopy-eligibility.bulk-redetermination(bulk/consumer.rs), durable, with its dead-letter queue on the sharedcanopy.dlqexchange (crates/canopy-mq/src/subscriber.rs); alarm oncanopy.unrouted. -
Routing preflight. Publish and consume one synthetic
determination.requestedon a prefixed queue before the first enabled deploy. -
Deploy snap, then eligibility with the flag on (Preconditions).
-
Enact preflight, per run. Preview complete and the failures page reviewed — overriding an unclean preview is audited. The enact ladder (
services/canopy-eligibility/src/api/bulk_runs_support.rs) re-resolves corpus and provenance and requires exact pin equality, snap’sattestation_enabled, and snap legal-today ≥ the run’sas_of: an enact on September 30 is a typed 409enact_too_early.
Sizing (defaults in BulkSettings::resolve)
| Setting | Default | Bound and rationale |
|---|---|---|
|
2 |
1..=4 consumers per replica. |
|
16 |
≥ 1. |
|
90 |
Capped at 240, below the 300 s |
|
1800 |
Must exceed |
|
1000 |
Raising it is a sizing decision; the in-place apply landed with #806 (expedited certifications are excluded at admission). |
|
5 |
1..=20; the consumer’s nack budget before a delivery dead-letters. |
Throughput ≈ replicas × K × (1 / determine latency); the canary holds the first case solo per phase.
Verify — the soak gate (pre-production)
A cohort of at least 5K seeded cases on at least two replicas with K=2, with
next-fiscal-year parameter fixtures staged so the preview/enact amount delta is
asserted (the devstack stages one parameter set, so its suite pins provenance,
not deltas). Watch: sustained settles per minute; interactive acceptance
(success/409 rate and p95) during the drain; a monotone backlog; breaker,
canary and deadline drills; the canopy.unrouted alert rule and consumer-attach
degradation firing.
Rollback
Set CANOPY_ELIGIBILITY__BULK_RUNS_ENABLED=false and redeploy eligibility: the
cohort dispatcher/finalizer worker stops; the determination.requested
consumers, the order sweep and the run pause/cancel/GET routes stay live.
determination.requested consumers and the prefetch check unconditional.