-
Notifications
You must be signed in to change notification settings - Fork 33
Spike: Persistent, multi-instance-safe storage strategy to replace in-memory service state #181
Copy link
Copy link
Closed
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third Campaignbackenddatabasedifficulty: spikeResearch/investigation issue — scope and approach are not yet definedResearch/investigation issue — scope and approach are not yet definedinfrastructurepriority: highHigh priority issueHigh priority issuequestionFurther information is requestedFurther information is requested
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third Campaignbackenddatabasedifficulty: spikeResearch/investigation issue — scope and approach are not yet definedResearch/investigation issue — scope and approach are not yet definedinfrastructurepriority: highHigh priority issueHigh priority issuequestionFurther information is requestedFurther information is requested
Description
Every domain service in the backend —
EscrowService,GigService,UserProfileService,IpfsPinningService, and the authNonceStoreService— stores its state in a process-local in-memoryMap. Only rate-limiting (src/common/rate-limit/) actually uses the Redis client that's wired up insrc/common/redis/redis.module.ts.This means:
GigExpiryWorkerService,RepinWorkerService) each run their ownsetIntervalper process, so N instances means N-way duplicate sweeps and N-way duplicate webhook dispatches for the same expiring/degraded record.The migration framework (
src/migration/) already models schema migrations against a stand-in in-memory "gigs" table, suggesting persistence is planned but not yet decided.Component
Backend
Difficulty
🟣 Spike — investigation required, scope not yet defined
Tasks
migrationframework's expectationsGigService, the newest/smallest) to the chosen persistence layerAcceptance Criteria
Estimated Time
2-3 days (time-boxed spike)