```yaml
product: AlterLab
title: "Request Throttling — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/request-throttling
```

infrastructure

# Request Throttling

Request throttling deliberately limits the rate at which a scraper sends requests to a target site, preventing detection and avoiding overloading the server.

Throttling is both a courtesy and a self-preservation strategy. Sending requests faster than a site can process them degrades the target's performance for real users and triggers rate-limit defences sooner. Throttling — capping requests to a fixed rate (e.g., 1 request per second per domain) — keeps scraping traffic below detection thresholds and mimics natural browsing patterns.

Implementations range from simple `time.sleep()` calls between requests to sophisticated token-bucket or leaky-bucket rate limiters that maintain a smooth request rate regardless of processing time variance. Token buckets accumulate credits at a constant rate (e.g., 1 token/second) and each request consumes one token — when tokens run out, the next request waits.

For distributed scraping across many workers, a centralised rate-limit store (Redis) coordinates throttling so that workers collectively respect the per-domain limit rather than each worker independently hitting the limit at full speed.

### What is Request Throttling?

Request throttling deliberately limits the rate at which a scraper sends requests to a target site, preventing detection and avoiding overloading the server.

### How does AlterLab handle Request Throttling?

For distributed scraping across many workers, a centralised rate-limit store (Redis) coordinates throttling so that workers collectively respect the per-domain limit rather than each worker independently hitting the limit at full speed.

## Examples

```
import asyncio

class TokenBucket:
    def __init__(self, rate: float):
        self.rate = rate  # tokens per second
        self.tokens = rate
        self.last = asyncio.get_event_loop().time()

    async def acquire(self):
        now = asyncio.get_event_loop().time()
        self.tokens = min(self.rate, self.tokens + (now - self.last) * self.rate)
        self.last = now
        if self.tokens < 1:
            await asyncio.sleep((1 - self.tokens) / self.rate)
        self.tokens -= 1
```

## Related Terms

[Rate LimitingA server-side control that caps the number of requests accepted from a single IP or session within a time window, returning HTTP 429 when exceeded.](https://alterlab.io/glossary/rate-limiting)[Exponential BackoffExponential backoff is a retry strategy where the wait time between successive retries increases exponentially, reducing load on rate-limited or temporarily unavailable endpoints.](https://alterlab.io/glossary/exponential-backoff)[Rate Limit HeadersRate limit headers are HTTP response headers that communicate how many requests remain in the current window and when the limit resets, allowing clients to self-throttle.](https://alterlab.io/glossary/rate-limit-header)[Concurrent CrawlingConcurrent crawling runs multiple URL fetches in parallel, balancing throughput against politeness by limiting simultaneous connections to any single domain.](https://alterlab.io/glossary/concurrent-crawling)[IP BanAn IP ban blocks all requests from a specific IP address or range, typically issued by a site or CDN after detecting automated or abusive traffic.](https://alterlab.io/glossary/ip-ban)

## Extract Request Throttling data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)