Queue WLM requests denied by a throttle limit instead of rejecting - #11
Open
dzane17 wants to merge 1 commit into
Open
Queue WLM requests denied by a throttle limit instead of rejecting#11dzane17 wants to merge 1 commit into
dzane17 wants to merge 1 commit into
Conversation
Signed-off-by: David Zane <davizane@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds request queueing on top of the shipped WLM throttling. When a search exceeds its workload group's throttle limit, instead of an immediate HTTP 429 the coordinator parks it in a bounded per-group queue and admits it once a permit frees. Scope: throttle-limit denials only (resource-limit rejection is unchanged).
Base branch:
3.7-wlm-throttling.How it works
queueobject on the workload group, sibling ofthrottling, with a single settingsize(default0= queueing disabled; over-limit requests are rejected immediately as before). Wire-gated atV_3_7_0.ActionListeneris held (no thread consumed, only the listener + open connection). Admitted later by one of three drains:close()drains the freed bucket (immediate, local);cancel_after_time_interval(per-request or thesearch.cancel_after_time_intervalcluster setting) or by disconnecting — either cancels the task, which evicts the parked entry promptly. The sweep only reaps already-cancelled tasks as defense-in-depth.GET _wlm/statsgainstotal_queued,total_queue_rejections,queued_current,queue_peak, and queue-wait aggregates (queue_wait_count,total_queue_wait_millis,max_queue_wait_millis).Testing
WlmQueueingIT: park-then-admit and queue-full → 429 end-to-end on a real cluster.cancel_after_time_interval/_tasks/_cancel) evicting parked requests promptly, cross-node owner-push draining with no stranding, round-robin fairness, mass-cancel recursion safety,queue.timeoutrejected as an unknown setting, and throughput/latency behavior under bursts up to 3000 concurrent../gradlew :server:precommitand:plugins:workload-management:precommitpass.Notes
queue.sizefield on the workload group API.queue.timeoutis intentionally not a setting — it is rejected as an unknown key so a stale config surfaces clearly.