Summary
Once dealbot is deployed multi-region (per FilOzone/infra#69 — workers in nbg1, ash, sin), all worker pods will pull from the same pg-boss queue. Without job routing by SP region, an APAC SP's job can still be picked up by an EU worker, so the multi-region deployment alone does not fix APAC reachability failures.
Background
Investigation in #478 showed APAC SPs (e.g. ruka-main, superusey-calib) fail dealbot checks from the current single-region (nbg1) egress due to long-haul TCP/TLS issues, not SP-side bugs. Tippy confirmed those SPs are healthy from APAC clients.
FilOzone/infra#69 adds worker pods in 3 regions and a `region` metric label, but does not introduce any routing layer. Job-to-worker assignment remains "random" via shared queue.
Acceptance criteria
Suggested approach (lightest)
- Add `spRegion` to provider model / config.
- In `apps/backend/src/jobs/jobs.service.ts`, when enqueuing a job for an SP, derive queue name from SP region (e.g. `sp-jobs-eu`, `sp-jobs-na`, `sp-jobs-apac`).
- Worker subscribes to a single queue selected via `DEALBOT_REGION` env var injected by the deployment (already varies per region in the infra PR).
- Default-route untagged SPs to the EU queue to preserve current behavior.
Out of scope
- Auto-detecting SP region from chain-registered metadata (could be future work — start manual)
- Queue rebalancing across regions when one is down (start with strict region routing; revisit if it becomes a reliability problem)
Related
Summary
Once dealbot is deployed multi-region (per FilOzone/infra#69 — workers in nbg1, ash, sin), all worker pods will pull from the same pg-boss queue. Without job routing by SP region, an APAC SP's job can still be picked up by an EU worker, so the multi-region deployment alone does not fix APAC reachability failures.
Background
Investigation in #478 showed APAC SPs (e.g. ruka-main, superusey-calib) fail dealbot checks from the current single-region (nbg1) egress due to long-haul TCP/TLS issues, not SP-side bugs. Tippy confirmed those SPs are healthy from APAC clients.
FilOzone/infra#69 adds worker pods in 3 regions and a `region` metric label, but does not introduce any routing layer. Job-to-worker assignment remains "random" via shared queue.
Acceptance criteria
Suggested approach (lightest)
Out of scope
Related