Queue backpressure proposal
markdown-assetsMarkdownRevision 1Public
How this was published
Publish
curl https://plan.undeleted.sh/publish \
-X POST \
-H "Authorization: Bearer $PLAN_API_KEY" \
-H "Content-Type: text/markdown" \
-H "X-Plan-Visibility: public" \
-H "X-Plan-Title: Queue backpressure proposal" \
--data-binary @proposal.md
# => {"id":"a1B2c3D4","url":"https://plan.undeleted.sh/p/a1B2c3D4", ...}Upload the asset
curl -X PUT https://plan.undeleted.sh/publish/a1B2c3D4/assets/flow.svg \ -H "Authorization: Bearer $PLAN_API_KEY" \ -H "Content-Type: image/svg+xml" \ --data-binary @flow.svg
Source
# Queue backpressure proposal

p99 latency spikes once queue depth crosses 500. This proposal adds a
shed-load check before a job reaches the worker.
## What changes
1. The publisher checks depth before enqueueing.
2. Over threshold, low-priority jobs get a 429 instead of a slot.
3. The dashboard already reads this queue's depth metric, so no new instrumentation is needed.
# Queue backpressure proposal  p99 latency spikes once queue depth crosses 500. This proposal adds a shed-load check before a job reaches the worker. ## What changes 1. The publisher checks depth before enqueueing. 2. Over threshold, low-priority jobs get a 429 instead of a slot. 3. The dashboard already reads this queue's depth metric, so no new instrumentation is needed.