Crawling a billion web pages in just over 24 hours, in 2025

(andrewkchan.dev)

108 points | by pseudolus 14 hours ago ago

37 comments

  • bndr 4 hours ago

    I run a small startup called SEOJuice, where I need to crawl a lot of pages all the time, and I can say that the biggest issue with crawling is the blocking part and how much you need to invest to circumvent Cloudflare and similar, just to get access to any website. The bandwith and storage are the smallest cost factor.

    Even though, in my case, users add their own domains, it's still took me quite a bit of time to reach 99% chance to crawl a website — with a mix of residential proxies, captcha solvers, rotating user-agents, stealth chrome binaries, otherwise I would get 403 immediately with no HTML being served.

    • 0xdeadbeefbabe an hour ago

      Blocking seems really popular. I wonder if it coincides with stack overflow closing.

    • mrweasel 3 hours ago

      Can't your users just whitelist your IPs?

      • dewey an hour ago

        I'm in a similar boat and getting customers to whitelist IPs is always a big ask. In the best case they call their "tech guy", in the worst case it's a department far away and it has to go through 3 layers of reviews for someone to adapt some Cloudflare / Akamai rules.

        And then you better make sure your IP is stable and a cloud provider isn't changing any IP assignments in the future, where you'll then have to contact all your clients again with that ask.

      • bndr 3 hours ago

        They're mostly non-technical/marketing people, but yes that would be a solution. I try to solve the issue "behind the scenes" so for them it "just works", but that means building all of these extra measures.

        • cassepipe an hour ago

          Would it make sense to advertise to the more technical minded a discount if they set up an IP whitelist with a tutorial you could provide ? A discount in exchange for reduced costs to you ?

    • gilrain 3 hours ago

      > the biggest issue with crawling is the blocking part and how much you need to invest to circumvent Cloudflare and similar … mix of residential proxies, captcha solvers, rotating user-agents, stealth chrome binaries

      I would like to register my hatred and contempt for what you do. I sincerely hope you suffer drastic consequences for your antisocial behavior.

      • bndr 2 hours ago

        Please elaborate, why exactly is it antisocial? Because Cloudflare decides who can or cant access a users website? When they specifically signed up for my service.

        • gilrain 2 hours ago

          It intentionally circumvents the explicit desires of those who own the websites being exploited. It is nonconsensual. It says “fuck you, yes” to a clearly-communicated “please no”.

          • joncrane 2 hours ago

            OP literally said that users add their domains, meaning they are explicitly ASKING OP to scrape their websites.

          • bndr 2 hours ago

            Users sign up for my service.

            • gilrain 2 hours ago

              You employ residential proxies. As such, you enable and exploit the ongoing destruction of the Internet commons. Enjoy the money!

              • christoff12 an hour ago

                This is kind of like getting upset with people who go to ATMs because drug dealers transact in cash lol.

              • toomuchtodo 21 minutes ago

                Cloudflare and Big Tech are primary contributors to the impairment and decline of the Internet commons for moats, control, and profit; you are upset at the wrong parties.

    • spiderfarmer 2 hours ago

      Just stop scraping. I'll do everything to block you.

      • ssgodderidge an hour ago

        > in my case, users add their own domains

        Seems like they're only scraping websites their clients specifically ask them to

      • Keyframe an hour ago

        Now you've gamified it :)

        • shimman an hour ago

          It's a pretty easy game to win as the blocker. If you receive too many 404s against pages that don't exist, just ban the IP for a month. Actually got the idea from a hackernews comment too. Also thinking that if you crawl too many pages you should get banned as well.

          There's no point in playing tug of war against unethical actors, just ban them and be done with it.

          I don't think it's an uncommon opinion to behave this way either, nor are the crawlers users I want to help in any capacity either.

          • stevewodil 5 minutes ago

            What is the crawler is using a shared IP and you end up blocking legitimate users with the bad actor?

  • snowhale 15 minutes ago

    The anti-bot stuff mentioned upthread is real, but at this scale per-domain politeness queuing also becomes a genuine headache. You end up needing to track crawl-delay directives per domain, rate-limit your outbound queues by host, and handle DNS TTL properly to avoid hammering a CDN edge that's mapping thousands of domains to the same IPs. Most crawlers that work fine at 100M pages break somewhere in that machinery at 1B+.

  • throwaway77385 4 hours ago

    > spinning disks have been replaced by NVMe solid state drives with near-RAM I/O bandwidth

    Am I missing something here? Even Optane is an order of magnitude slower than RAM.

    Yes, under ideal conditions, SSDs can have very fast linear reads, but IOPS / latency have barely improved in recent years. And that's what really makes a difference.

    Of course, compared to spinning disks, they are much faster, but the comparison to RAM seems wrong.

    In fact, for applications like AI, even using system RAM is often considered too slow, simply because of the distance to the GPU, so VRAM needs to be used. That's how latency-sensitive some applications have become.

    • fluoridation 3 hours ago

      >for applications like AI, even using system RAM is often considered too slow, simply because of the distance to the GPU

      That's not why. It's because RAM has a narrower bus than VRAM. If it was a matter of distance it'd just have greater latency, but that would still give you tons of bandwidth to play with.

      • dist-epoch 2 hours ago

        You could be charitable and say the bus is narrow because it has to travel a long distance and this makes it hard to have a lot of traces.

        • fluoridation an hour ago

          It's not. It's narrow even between the CPU and RAM. That's just the way x86 is designed. Nvidia and AMD by contrast have the luxury of being able to rearchitect their single-board computers each generation as long as they honor the PCIe interface.

          It is also true that having a 384-bit memory bus shared with the video card would necessitate a redesigned PCIe slot as well as an outrageous number of traces on the motherboard, though.

          • dist-epoch an hour ago

            ThreadRipper has 8 memory channels versus 2 for a desktop AMD CPU. It's not an x86 limitation.

            • fluoridation an hour ago

              "x86" as in the computer architecture, not the ISA. Why do you think they put extra channels instead of just having a single 512-bit bus?

  • finnlab 10 hours ago

    Nice work, but I feel like it's not required to use AWS for this. There are small hosting companies with specialized servers (50gbit shared medium for under 10$), you could probably do this under 100$ with some optimization.

    • nurettin 5 hours ago

      I did some crawling on hetzner back in the day. They monitor traffic and make sure you don't automate publically available data retrieval. They send you an email telling you that they are concerned because you got the ip blacklisted. Funny thing is: They own the blacklist that they refer to.

    • varispeed 5 hours ago

      This. AWS is like a cash furnace, only really usable for VC backed efforts with more money than sense.

  • dangoodmanUT 4 hours ago

    > because redis began to hit 120 ops/sec and I’d read that any more would cause issues

    Suspicious. I don’t think I’ve ever read anything that says redis taps out below tens of thousands of ops…

  • thefounder 5 hours ago

    Well the most important part seems to be glossed over and that’s the IP addresses. Many websites simply block /want to block anything that’s not google and is not a “real user”.

  • ph4rsikal 5 hours ago

    When I read this, I realize how small Google makes the Internet.

  • sunpolice 3 hours ago

    I was able to get 35k req/sec on a single node with Rust (custom http stack + custom html parser, custom queue, custom kv database) with obsessive optimization. It's possible to scrape Bing size index (say 100B docs) each month with only 10 nodes, under 15k$.

    Thought about making it public but probably no one would use it.

  • handfuloflight 5 hours ago

    There was a time when being able to do this meant you were on the path to becoming a (m)(b)illionaire. Still is, I think.

  • gethly 35 minutes ago

    > I also truncated page content to 250KB before passing it to the parser.

    WTF did I just read?