This Scrapy project uses Redis and Kafka to create a distributed on demand scraping cluster.
100K+
The goal is to distribute seed URLs among many waiting spider instances, whose requests are coordinated via Redis. Any other crawls those trigger, as a result of frontier expansion or depth traversal, will also be distributed among all workers in the cluster.
The input to the system is a set of Kafka topics and the output is a set of Kafka topics. Raw HTML and assets are crawled interactively, spidered, and output to the log. For easy local development, you can also disable the Kafka portions and work with the spider entirely via Redis, although this is not recommended due to the serialization of the crawl requests.
This project tries to bring together a bunch of new concepts to Scrapy and large scale distributed crawling in general. Some bullet points include:
Each component for Scrapy Cluster is designated as a tag within the root docker repository. Unlike a lot of projects, we chose to keep the dockerized Scrapy Cluster within the same github repository in order to stay consistent with how the project is used. This means that there will be no latest tag for Scrapy Cluster, instead the tags are defined as follows.
Kafka Monitor: istresearch/scrapy-cluster:kafka-monitor-{release/build}
Redis Monitor: istresearch/scrapy-cluster:redis-monitor-{release/build}
Crawler: istresearch/scrapy-cluster:crawler-{release/build}
Rest: istresearch/scrapy-cluster:rest-{release/build}
For example istresearch/scrapy-cluster:redis-monitor-1.2 would be the official stable 1.2 release of the Redis Monitor, but istresearch/scrapy-cluster:redis-monitor-dev would be tied to the latest dev branch release. Typically numeric releases will be paired with the master branch, while -dev releases will be paired with the dev branch.
Please check out our official Scrapy Cluster documentation for more details on how everything works!
Content type
Image
Digest
Size
340.7 MB
Last updated
over 5 years ago
docker pull istresearch/scrapy-cluster:rest-ci-dev