|
Hi! What is the purpose of the 'CONCURRENT_REQUESTS_PER_IP' setting in Scrapy, and how does it work with 'CONCURRENT_REQUESTS'? Does it apply only when downloading from the same IP? In what scenarios is it recommended to use? I am using a proxy provider that handles proxy rotation on their side. If I set 'CONCURRENT_REQUESTS_PER_IP' to 10, does it limit the requests to 10 per IP assigned by the proxy provider, or does Scrapy treat the IPs differently? Thanks! |
Replies: 1 comment
|
It is not meant for your use case. It should not affect proxy IPs in any way.
It is meant for a scenario where you might target 2 or more domains that actually have the same IP address, and you donβt want to send too many requests to them. Letβs say you have a spider targeting these domains @ IPs:
In practice, however, this scenario where different domains you are targeting point to the same IP address is uncommon. It is in fact more common to see a domain that points to multiple IP addresses instead. So there is rarely a use case for this setting. Moreover, some features of Scrapy are not compatible with the use of So I would personally discourage the use of this setting in general. |
It is not meant for your use case. It should not affect proxy IPs in any way.
CONCURRENT_REQUESTS_PER_IPis a barely used and barely supported alternative toCONCURRENT_REQUESTS_PER_DOMAIN.It is meant for a scenario where you might target 2 or more domains that actually have the same IP address, and you donβt want to send too many requests to them.
Letβs say you have a spider targeting these domains @ IPs:
a.exampleandb.exampleare different domains but point to the same IP address, which usually means the same server (well, it always means the same server, but it could be a lightweight reverse proxy for multiple β¦