Skip to content

feat(webhooks): coordinate dispatch capacity with Redis (NAN-6407) - #6871

Closed
agusayerza wants to merge 7 commits into
agus/NAN-6404/webhook-admissionfrom
agus/NAN-6407/redis-dispatch-capacity
Closed

feat(webhooks): coordinate dispatch capacity with Redis (NAN-6407)#6871
agusayerza wants to merge 7 commits into
agus/NAN-6404/webhook-admissionfrom
agus/NAN-6407/redis-dispatch-capacity

Conversation

@agusayerza

@agusayerza agusayerza commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • coordinate SQS polling across autoscaled jobs instances with Redis-backed expiring permits
  • adapt the shared concurrency limit from healthy admission latency and explicit overload feedback
  • acquire capacity before receiving SQS messages and renew leases through acknowledgement
  • add NANGO_TASK_DISPATCH_REDIS_COORDINATION_ENABLED as a rollout killswitch that preserves current per-instance polling when disabled

Stack

Linear: NAN-6407

Review in cubic

@linear-code

linear-code Bot commented Jul 22, 2026

Copy link
Copy Markdown

NAN-6407

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Confidence score: 5/5

  • Safe to merge after the addressed issues were fixed.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts
Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts
Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts Outdated
Comment thread packages/jobs/lib/webhook/dispatch-queue/consumer.ts Outdated
Comment thread packages/utils/lib/environment/parse.ts
Comment thread packages/utils/lib/environment/parse.ts Outdated
@agusayerza
agusayerza force-pushed the agus/NAN-6404/webhook-admission branch from 7c69514 to 09f4da1 Compare July 22, 2026 18:01
@agusayerza
agusayerza force-pushed the agus/NAN-6407/redis-dispatch-capacity branch from 711204b to f592ed9 Compare July 22, 2026 18:01

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files

Confidence score: 5/5

  • Safe to merge after the addressed issues were fixed.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts
Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.integration.test.ts Outdated
@agusayerza
agusayerza force-pushed the agus/NAN-6404/webhook-admission branch from 09f4da1 to fda2974 Compare July 22, 2026 19:15
@agusayerza
agusayerza force-pushed the agus/NAN-6407/redis-dispatch-capacity branch from f592ed9 to 5c6fa4c Compare July 22, 2026 19:15

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts Outdated
Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts Outdated
Comment thread packages/jobs/lib/webhook/dispatch-queue/consumer.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.ts Outdated
Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.unit.test.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread packages/jobs/lib/webhook/dispatch-queue/capacity-coordinator.unit.test.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant