On the other hand, if you are building a massive crawler you want to split the crawling and parsing into two separate functions and do the network I/O in golang/c and do the parsing with a Javascript headless browser like phantom.
I don't really see any reason to use python unless you haven't learned golang (the world's biggest crawler's own language).
Not close to a real comparison without the same URLs, but still fun to compare.
Did you happen to track memory usage at all? It would take a while to settle down, for sure.
I'm always interested in the amount of overhead Docker brings to the table. No biggie either way, thanks for sharing these details.
I was hoping to compare resource utilization and performance between 40 Docker instances each with 20 connections vs. 1 process.
It's not even clear whether or not the author actually hit any external websites: In order to have a quick test , I just build a nginx hello page in my cloud server. Then scale it up to a list of 1000000.
It's just a tutorial about how to use docker and celery to build a distributed system. I will have more test about the performance of multiprocess/threads/concurrencies or some other library that supports these technics. In this case, if you don't know how to or even don't want to build a test web server, some big sites like example.com could be your choice. BUT please be gentle to these public sites.
Thanks for your comment.
Scrapy is good framework for crawler. I used it before, but it doesn't have some features I want. Writing a brand new one is easier for me.
Of course , I am open to compare the special performances of these two crawlers. Welcome to have a discuss more technical details here.
Thanks for your comment again.
Of course, it matters what you're doing with the page content, and how you're managing your metadata, and all that.
You are right, asyncio and aiohttp is a great combination. I've used them both before. Though aiohttp cost less memory than requests, aiohttp does't support https proxy. This is the only one that isn't so perfect.
Besides , asyncio is something the same as concurrency of celery. I will have a test which one will have a better performance.
Thanks for your comment again.