---
title: "Rate-limit downstream APIs with separate Task Queues"
description: "Stop hitting 429s on downstream APIs. Use rate-limited Temporal Task Queues to keep Activities under SendGrid, Stripe, and OpenAI quotas."
canonical: "https://temporal.io/blog/rate-limit-downstream-apis.md"
source: "https://temporal.io/blog/rate-limit-downstream-apis"
published: "2026-05-25"
updated: "2026-07-16"
authors:
  - "Cecil Phillip"
category: "Temporal Concepts"
tags:
  - "Python"
  - "Architecture"
  - "Retries"
  - "Scaling"
reading_time_minutes: 1
---

# Rate-limit downstream APIs with separate Task Queues

Modern applications integrate with numerous external APIs (SendGrid, Stripe, OpenAI, Twilio) that enforce rate limits to protect their infrastructure. These limits vary by provider service and plan. Without proactive rate limiting when calling downstream services, users may experience “too many request” errors, failed workflows, wasted execution, cascading failures, and even account suspension.

The Temporal Validated Pattern [“Rate-limit downstream APIs with separate Task Queues”](https://docs.temporal.io/guides/rate-limit-downstream-apis) shows you how to use separate Task Queues with rate limiting configuration to protect downstream APIs. Create one Task Queue per rate-limited API and configure:
- `max_task_queue_activities_per_second`: Global rate limit across all Workers on the queue
- `max_activities_per_second`: Per-Worker rate limit (optional, for additional control)
- `max_concurrent_activities`: Limit concurrent executions when API has concurrency limits

This ensures Activities calling external APIs never exceed their rate limits, preventing 429 errors and account issues.
