Skip to content

Add configurable request queues and load shedding - #1

Open
samuel-williams-shopify wants to merge 2 commits into
mainfrom
feature/configurable-request-queues
Open

Add configurable request queues and load shedding#1
samuel-williams-shopify wants to merge 2 commits into
mainfrom
feature/configurable-request-queues

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an immutable Ruby configuration DSL for multiple request queues
  • centralize worker permit matching in a scheduler with FIFO arbitration across queue heads
  • add spread and affinity-packing balance policies, hard worker eligibility, and extensible policy objects
  • add per-queue depth/wait limits, a global pending limit, and configurable 429/Retry-After shedding
  • preserve the existing single-queue, single-permit behavior by default

Scheduling model

Requests follow:

classify -> admit/reject -> enqueue -> match permit -> dispatch

Only the central scheduler consumes permits. Queue affinity remains soft and work-conserving: when the preferred worker has no permit, another eligible worker can accept the request.

Configuration

Applications can explicitly load trusted configuration from config/fantail.rb using Fantail::Configuration.load. Configuration is finalized and frozen before use.

Testing

  • bundle exec bake test
  • bundle exec rubocop
  • 35 examples, 74 assertions
  • 100% line coverage
  • 99/99 public definitions documented

Assisted-By: devx/065220da-7d48-4279-a513-aedd3bbfa4da
Assisted-By: devx/065220da-7d48-4279-a513-aedd3bbfa4da
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