Slack API Rate Limit & Backoff Strategy Prompt
Design a resilient Slack API client that respects per-method rate-limit tiers, honors Retry-After, batches and coalesces calls, and never gets the app throttled into a death spiral.
- Target user
- Engineers whose Slack app makes high-volume API calls
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a reliability engineer who has debugged a Slack app that bursted thousands of chat.postMessage calls, got 429'd, retried naively, and made it worse. I will provide: - Which Slack methods we call and at what volume - Whether calls are user-triggered, scheduled, or fan-out (notify 500 users) - Our HTTP client/runtime - Symptoms (429s, ratelimited errors, slow notifications, partial sends) Your job: 1. **Tier model** — explain Slack's per-method rate-limit tiers (Tier 1–4 plus special cases like chat.postMessage's per-channel limit) and the special handling for posting to many channels. Map MY methods to their tiers. 2. **Honor Retry-After** — on HTTP 429, read the `Retry-After` header and wait exactly that long; never retry immediately. Show the correct loop. Treat `ratelimited` JSON errors the same. 3. **Client-side rate limiting** — a token-bucket / leaky-bucket limiter PER method (and per channel for chat.postMessage) so you self-throttle before Slack does. Give the bucket sizing. 4. **Backoff for other failures** — exponential backoff with jitter for 5xx and network errors; cap retries; distinguish retryable from non-retryable (`invalid_auth`, `channel_not_found` must NOT retry). 5. **Fan-out strategy** — for "notify 500 people", coalesce, queue, and pace sends rather than firing in a tight loop; consider a single message with mentions vs N DMs. 6. **Coalescing & dedup** — batch rapid updates to the same message via chat.update instead of new posts; debounce noisy event-driven sends. 7. **Observability** — track 429 rate, per-method call volume, queue depth, and time-to-deliver; alert on sustained throttling before users notice. Output as: (a) the per-method limiter with bucket sizes, (b) the request wrapper honoring Retry-After + jittered backoff + retryable classification, (c) the fan-out queue/pacer, (d) the coalescing logic for updates, (e) a load-test plan to validate you stay under the limits. Bias toward: self-throttling before Slack does, exact Retry-After compliance, and never retrying non-retryable errors.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Production-Grade Slack API Client Design Prompt
Design a hardened Slack API client library — token rotation, rate limiting, retries, dedup, audit logging, and Block Kit composition — for services that post to Slack at scale.
-
Slack App Cold-Start & 3-Second Ack Latency Optimization Prompt
Diagnose and fix Slack app latency that breaks the 3-second ack budget — serverless cold starts, sync work in handlers, and defer-then-followup patterns.
-
Slack Seat and Usage Cost Reporting Bot
Design a scheduled bot that pulls Slack Enterprise/Business+ admin usage and billing data, computes seat cost and inactive-seat waste, and posts a weekly FinOps digest to a Slack channel with reclaim recommendations.
-
Slack Stars API Personal Ops Triage Queue
Build a personal follow-up queue for on-call engineers using the Slack stars API (saved items) so starred alerts, threads, and files become a triageable to-do list that clears itself as work completes.
More Slack prompts & error guides
Browse every Slack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.