Create a Google Cloud Tasks queue to reliably execute HTTP endpoints with rate limiting and retry

domain: cloud.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a queue in a specific location using the Cloud Tasks API or gcloud tasks queues create, which by default gets sensible rate-limit and retry defaults
  2. Configure the queue's rate limits by setting max_dispatches_per_second (the system derives max_burst_size automatically from this value) to bound how fast tasks are dispatched, whether first attempts or retries
  3. Configure retry behavior with MIN_INTERVAL and MAX_INTERVAL (exponential backoff bounds), MAX_DOUBLINGS (how many times the retry interval doubles before becoming constant), and MAX_ATTEMPTS/MAX_RETRY_DURATION to bound total retry attempts and time
  4. Enqueue tasks targeting an HTTP endpoint (an HTTP target task) by specifying the URL, method, headers, and body; a task attempt is considered successful only if the endpoint returns an HTTP status in the 200-299 range
  5. Handle transient overload gracefully: if the worker returns 429 or 503, or the observed error rate is high, Cloud Tasks automatically increases its backoff rate for that queue
  6. Monitor queue depth and task attempt counts via Cloud Monitoring to detect endpoints that are failing persistently

Known gotchas

Related routes

Produce and consume messages with Cloudflare Queues including retry configuration
cloudflare-queues · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans