---
title: "When to Rotate Crawler IPs: 5 Practical Rules · KimiData"
description: "Learn when a crawler should rotate IPs, when to keep a sticky session, how to read 429 responses, and how to validate a permitted crawl without guessing."
url: "https://kimidata.com/blog/when-to-rotate-crawler-ips"
language: "en"
---

# When Should a Crawler Rotate IPs Between Requests?

> Learn when a crawler should rotate IPs, when to keep a sticky session, how to read 429 responses, and how to validate a permitted crawl without guessing.

Should a crawler use a new exit IP for every request, keep one IP through a page sequence, or stay on one route for the entire job? The right choice depends on what the request is doing. Independent regional samples may need separate exits; pagination and other linked reads often need a consistent session. IP rotation is not a substitute for request pacing, permission, or a site’s published limits. This guide gives you a practical way to choose the rotation unit, interpret response signals, and run a small permitted test before scaling. It also explains what to do when a site returns 429 or 403, so the crawler changes behavior responsibly instead of automatically switching IPs and repeating the same request.

 

## The short answer: rotate between independent tasks, not automatically after every request

 

Rotate an IP between requests when each request is an independent unit of work and the task has a legitimate reason to use a separate exit, such as collecting permitted regional samples from different markets. Keep the same IP for requests that form one logical sequence, such as reading a listing and its next pages when the result depends on session cookies, pagination state, or a stable region.

 

Do not set rotation to “every request” by default. A fixed timer such as “every five minutes” is not a sound rule either. Neither reflects whether two requests belong to the same task, whether the target permits the crawl, or whether the current request rate is acceptable.

 

A useful way to think about rotation is as a **session boundary**:

 

- **Per-request rotation:** each independent request may use a different exit IP.
- **Sticky session:** a sequence of related requests keeps the same exit for a configured session.
- **Fixed route:** a job retains one IP or egress identity for its whole run.

 

Those are routing choices. A crawler’s delay, concurrency, and retry policy are separate controls. Changing the IP does not make a request rate acceptable, and it does not override a website’s terms, rate limits, or access controls.

 

## Choose the rotation unit from the work the crawler is doing

 

Before configuring a proxy, label the smallest unit that must remain consistent. It might be one product’s page sequence, one market sample, one API job, or one scheduled crawl. Then decide whether two consecutive requests belong to the same unit.

 

| Work unit | Usually suitable routing choice | Why |
| --- | --- | --- |
| Independent public pages sampled from different authorized regions | Rotate between samples or use a region-specific exit | Each sample needs its own location context; continuity between samples is not required |
| Listing pages followed by pagination or sequential reads | Keep a sticky session for the sequence | Cookies, page tokens, and regional presentation may depend on continuity |
| Repeated checks of the same page from one market | Keep the location stable; rotate only at a clearly defined new measurement window if the task calls for it | Holding location steady makes results easier to compare |
| A long-running job whose output depends on one stable route | Keep a fixed route if the service and target permit it | Avoid changing network identity in the middle of a stateful operation |
| A target that documents an API or crawl limit | Follow that limit and the documented retry behavior | Rotation does not grant permission to exceed a published limit |

 

These are starting points, not rules for every website. A target may bind state to cookies, tokens, a session identifier, or other controls. If the public API or site documentation describes a supported way to access the data, prefer it over HTML crawling. If the target’s terms or an explicit response prohibit the activity, stop rather than trying another IP.

 

KimiData’s current rotating residential product page lists rotation per request and sticky sessions. Its web-scraping workflow page recommends rotating independent requests while keeping a sticky session for pagination or sequential reads. The exact endpoint and session behavior should still be confirmed in the product console before a production job.

 

## Why rotating too often can make a crawl less reliable

 

A crawler can lose context if the exit IP changes in the middle of a sequence. A site may return different regional content, invalidate a session, or deliver pagination results that no longer match the earlier page. Even when the target does not use session state, changing the exit on every request can make it harder to reproduce an error or compare results from the same location.

 

Rotation can also add operational work. The crawler must associate each response with the route and session that produced it, distinguish a target response from a proxy connection error, and avoid repeating a request simply because the exit changed. If requests are retried across several IPs without respecting the target’s limits, total request volume can increase while the underlying issue remains unresolved.

 

That is why an IP should not be treated as a retry button. First identify whether the failure is caused by a wrong URL, parser bug, expired credential, timeout, target rate limit, or a site-side restriction. Rotate only when a new route is part of the permitted task design, not to push through a denial.

 

## A 429 response is a pacing signal, not an instruction to rotate

 

HTTP 429 means the client has sent too many requests in a given period. [RFC 6585](<https://www.rfc-editor.org/rfc/rfc6585.html>) allows a server to include a Retry-After header indicating how long to wait. When that header is present, use it in the retry schedule. If it is absent, pause the affected source, reduce concurrency, and apply a conservative backoff rather than immediately sending the same request from a new IP.

 

A 429 response does not reveal by itself which identifier the target uses for its limit. The limit could be associated with a route, account, token, endpoint, or another target-defined dimension. Do not assume that changing an IP changes the limit or makes another attempt permitted. Check the target’s API documentation, response headers, terms, or support guidance.

 

A 403 response or an explicit block is different from an ordinary transient timeout. It may indicate that the request is not allowed. Do not rotate through addresses to keep sending the same request after an access denial, CAPTCHA, or anti-scraping response. Review the permission and stop or contact the site owner where appropriate.

 

A timeout or 5xx response also does not automatically mean that an IP should change. Check whether the problem is isolated to a destination, a network route, or a response parser. Lower the request pace if errors and latency rise together. A proxy authentication error such as 407 should lead you to check the credentials and endpoint settings, not to cycle through IPs.

 

## Use throttling and rotation as separate controls

 

Crawler frameworks can regulate how quickly requests reach a site. Scrapy’s [AutoThrottle documentation](<https://docs.scrapy.org/en/latest/topics/autothrottle.html>) explains how it adjusts per-domain delays based on response latency, while respecting configured concurrency and delay limits. It also notes that an error response should not cause the delay to shrink. This is useful because fast error responses can otherwise make a crawler send requests more quickly precisely when it should be slowing down.

 

For a permitted Scrapy pilot, enable AutoThrottle and start with a low target concurrency. Review the settings for the installed Scrapy version and replace the illustrative values below with the target’s documented limits. These example settings are for controlled tuning; they are not a universal safe rate.

 

```python
AUTOTHROTTLE_ENABLED = True
AUTOTHROTTLE_START_DELAY = 5.0
AUTOTHROTTLE_MAX_DELAY = 60.0
AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
CONCURRENT_REQUESTS_PER_DOMAIN = 1
```

 

Record the response status, Retry-After value, response latency, session or job identifier, exit IP where appropriate, bytes transferred, and whether the parsed record passed validation. Scrapy’s [optimization guide](<https://docs.scrapy.org/en/latest/topics/optimize.html>) recommends watching 429 and 503 counts, retry counts, and rising latency when increasing concurrency. Its [practice guidance](<https://docs.scrapy.org/en/latest/topics/practices.html>) also notes that crawl-delay or request-rate directives are not automatically applied by Scrapy; translate site-specific instructions into the framework’s delay and concurrency settings yourself.

 

The rate and the route should be logged separately. If a run changes both at once, you cannot tell whether an improvement came from lower concurrency, a different session, or a different region. Do not test by increasing the total load against a site that has already asked you to slow down.

 

## A five-step decision process

 

1. **Check permission and the data source.** Review the site’s terms, robots instructions, API documentation, and any written authorization. If a supported API or bulk data source exists, use it where practical. Do not collect personal or restricted data without a lawful basis and permission.
2. **Define the task boundary.** Decide whether one unit is a single independent page, a multi-page sequence, or a regional sample. Keep requests in the same sequence on one session when continuity affects the result.
3. **Choose the least complex route that meets the task.** Use one stable route for a sequence; use per-request rotation only for independent requests when the task and target permit it. For location comparisons, keep each sample’s location fixed and record it.
4. **Run a small, low-rate pilot.** Keep concurrency and request pace conservative. Compare the returned page, status, completeness, parse results, duplicates, and latency. Change one variable at a time.
5. **Respond to signals within the target’s rules.** Honor Retry-After, reduce concurrency when 429s or rising latency appear, correct proxy configuration errors, and stop on an explicit access denial. Do not use rotation to continue a prohibited crawl.

 

For a clean comparison, record at least the task ID, source, request timestamp, region, session identifier, route or exit address if available, response status, latency, content checksum or record count, parser result, and retry decision. Treat exit IP as diagnostic information and handle it under your privacy and retention rules.

 

## How to tell whether your rotation policy is working

 

The goal is not to maximize the number of IPs used. The goal is to collect the permitted data accurately and repeatably at a request pace the target allows. Compare runs using the same source, region, request set, parser version, and concurrency. Change only the session policy: for example, keep a session for each page sequence in one run and use per-request rotation for independent samples in another.

 

Evaluate whether the records are complete, duplicates are controlled, pagination is consistent, and the results can be reproduced. Review HTTP status trends, response latency, parse failures, retries, and traffic consumption. If the only apparent gain is that a denied request receives another attempt from a different address, the policy is not a compliant success criterion.

 

When the page content changes by region, test a single authorized region at a time and keep its location stable for that sample. When a sequence depends on state, repeat the same sequence under one sticky session and verify that the returned pages link together. If the target responds with a rate limit, pause and lower the load before resuming under its stated rules.

 

## When to change the plan

 

Move from per-request rotation to sticky sessions when pages are linked by pagination, cookies, or sequence state, or when regional consistency matters within one sample. Move from sticky sessions to independent rotation only when the next request begins a genuinely separate permitted task and the task requires a separate exit or region.

 

Change the request schedule before changing IPs when 429s, 503s, rising latency, or growing retry counts appear. Fix credentials or proxy configuration when the proxy returns an authentication or connection error. Stop the crawl and seek permission or an approved interface if the target denies access or its rules prohibit the collection.

 

KimiData’s [web-scraping workflow](<https://kimidata.com/solutions/web-scraping>) describes per-request rotation for independent requests and sticky sessions for pagination, alongside measuring status, transferred bytes, and parse rates before scaling. If your authorized workflow needs those two session patterns, review the [rotating residential proxy options](<https://kimidata.com/proxies/residential>) and validate the actual endpoint and session settings on a small permitted sample. The [proxy setup guide](<https://kimidata.com/guides/proxy-setup>) explains how to check a connection’s exit IP; an IP check confirms the route observed by that request, not whether a target permits the crawl.

 

Use proxies only for lawful, authorized data work. KimiData’s [Terms of Service](<https://kimidata.com/legal/terms>) prohibit unauthorized crawling and evading anti-scraping measures or a target platform’s access restrictions and terms. Always follow the target’s terms, privacy requirements, published request limits, and applicable law.

 

## Frequently asked questions

 

### Should I rotate IPs after every request?

Only when each request is an independent task and per-request rotation is permitted and useful for that task. Keep a sticky session when several reads belong to one pagination sequence or regional sample. There is no universal request count or timer that fits every target.

 

### Should I switch IPs when a crawler receives HTTP 429?

Not as the automatic first response. A 429 is a rate-limit response. Honor Retry-After when provided, pause the source, and reduce request pace or concurrency. Do not use a different IP to continue a crawl the target has limited or prohibited.

 

### Is a sticky session better for pagination?

It is often the more consistent option when page tokens, cookies, regional output, or other state carry across requests. Confirm that the target and proxy endpoint permit the workflow, then check that the sequence returns complete and linked pages.

 

### How can I measure whether IP rotation improves a crawler?

Run a small permitted comparison with the same URLs, region, parser, request pace, and concurrency. Change only the session policy, then compare completeness, duplicates, response statuses, latency, parse failures, retries, and reproducibility.

 

### Does rotating an IP guarantee that a request will be accepted?

No. A target may apply rules using factors other than the exit IP, and a new route does not override its terms or rate limits. Treat a denial as a reason to check permission and stop or adjust the workload under the target’s guidance.

**Max**
 Written by the author above and published by KimiData

[View original page](<https://kimidata.com/blog/when-to-rotate-crawler-ips>) · [llms.txt](<https://kimidata.com/llms.txt>)
