Bound duplicate refresh work across API instances
A popular product expires and every API instance refreshes it simultaneously, increasing pressure on the source database.
- Focused work estimate
- 3h + prerequisites
- Priority in the scenario
- Medium
- Engineering practice
- Single-flight · Lease limits
Estimated field mix
- Distributed systems60%
- Performance engineering40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional wholesale portal caches product availability descriptions across several API instances. Delayed invalidations and slow refreshes bring back old content after edits.
Setup prerequisites
- Create two local cache clients and a synthetic authoritative product store.
- Use a fake clock and controllable read/write barriers.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
- ACACHE-101 · Define cache keys from every product-view authority input
- ACACHE-102 · Specify what stale product data the portal may display
- ACACHE-103 · Record authoritative product revision with each cached projection
- ACACHE-104 · Commit product changes with a durable invalidation fact
- ACACHE-105 · Prevent a slow cache fill from overwriting a newer product revision
- ACACHE-106 · Handle delayed invalidation without evicting a newer cache revision unnecessarily
Acceptance criteria
- Use a bounded per-key refresh ownership mechanism.
- Waiters have a deadline and declared stale/miss fallback.
- Expired refresh ownership cannot publish an older revision.
Implementation constraints
- A refresh lock reduces duplicate work; revision fencing still protects correctness.
Verification to include
- Request one expired synthetic key from two clients and observe bounded refresh calls.
- Pause the owner past expiry and verify stale completion cannot overwrite newer data.
Deliverables
- Shared refresh coordinator and expired-owner test
Rollout and recovery
Canary a small key cohort; disable coordination while retaining revision guards if locks stall.
Value of the work
For the engineer: Practice cache consistency, version guards and recoverable invalidation.
For the team: Review fast derived reads without losing authoritative state or tenant isolation.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.