Skip to content

21.2 Readiness cost metering #1063

Description

@determined-001

Labels: type:feature area:workers type:ops
Milestone: Phase 4 - Workers W3: backstop
Effort: Medium
Depends on: 21.1

Description

§C.7 is explicit: model the readiness cost before pricing, because it is not pure
margin. Monitoring cost scales with the number of backstopped subscriptions
regardless of how many ever need intervention.

Meter it: RPC calls, export scans, compute and storage attributable per
subscription per window. Without this, the pricing page in 21.3 is a guess and
the product's margin is discovered in a monthly bill.

Acceptance criteria

  • Per-subscription cost attribution for RPC calls, export scans, compute time
    and storage
  • Aggregated cost per subscription per window, queryable over time
  • Marginal cost of one additional backstopped subscription reported explicitly
  • Metrics exported through the existing Prometheus and OTel surfaces
  • A dashboard or documented query showing cost against subscription count
  • Written cost model in docs/design/ with the measured numbers, not estimates

Implementation notes

  1. Reuse the metrics interfaces in packages/pulse-webhooks/src/metrics.ts,
    PrometheusWebhookMetrics.ts and OtelWebhookMetrics.ts - one metrics idiom
    across the project.
  2. Report marginal cost, not just total. Total cost hides the shape of the curve,
    and the shape is what decides whether the tier is viable at scale.
  3. Shared monitoring across subscriptions watching the same condition is the main
    lever; measure before optimizing it.

Affected files

  • packages/worker-core/src/backstop/costMeter.ts
  • packages/worker-core/src/metrics.ts
  • docs/design/backstop-cost-model.md

Metadata

Metadata

Assignees

Labels

Stellar WaveDrips Wave Program - opt an issue in by applying this labelarea:workersWorker layer and worker marketplace (packages/worker-core)blockedWaiting on an upstream issuecomplexity:medium150 pointstype:feature--forcetype:opsDeployment, CI, secrets, release mechanics

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions