Skip to content
undeleted

Queue backpressure proposal

markdown-assets · Markdown · Rev 1 · Public
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

the source.

# Queue backpressure proposal

![Current flow](assets/flow.svg)

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 — no new instrumentation

# Queue backpressure proposal

![Current flow](assets/flow.svg)

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 — no new instrumentation