Live data from Hacker News

Cloudflare crawl endpoint

developers.cloudflare.com

91–100 of 194 posts

Re: Cloudflare crawl endpoint

#91

I'm surprised that Cloudflare hasn't started hosting a pre-scraped version of websites that use Cloudflare's proxy - something like https://www.example.com/cdn-cgi/cached-contents.json They already have the website content in their cache, so why not just cut out the middle man of scraping services and API's like this and publish it? Obviously there's good reasons NOT to, but I am surprised they haven't started offeri…

Well, the conversion process into the JSON representation is going to take CPU, and then you have to store the result, in essence doubling your cache footprint.

Doing it on demand still utilizes their cached version, so it saves a trip to the origin, but doesn’t require doubling the cache size. They can still cache the results if the same site is scraped multiple times, but this saves having to cache things that are never going to be requested.

Cache footprint management is a huge factor in the cost and performance for a CDN, you want to get the most out of your storage and you want to serve as many pages from cache as possible.

I know in my experience working for a CDN, we were doing all sorts of things to try to maximize the hit rate for our cache.. in fact, one of the easiest and most effective techniques for increasing cache hit rate is to do the OPPOSITE of what you are suggesting; instead of pre-caching content, you do ‘second hit caching’, where you only store a copy in the cache if a piece of content is requested a second time. The idea is that a lot of content is requested only once by one user, and then never again, so it is a waste to store it in the cache. If you wait until it is requested a second time before you cache it, you avoid those single use pages going into your cache, and don’t hurt overall performance that much, because the content that is most useful to cache is requested a lot, and you only have to make one extra origin request.

Re: Cloudflare crawl endpoint

#92

Earlier quoted context omitted.

> I'm surprised that Cloudflare hasn't started hosting a pre-scraped version of websites that use Cloudflare's proxy It's entirely possible that they're doing this under the hood for cases where they can clearly identify the content they have cached is public.

How would they know the content hasn’t changed without hitting the website?

Keeping track of when content changes is literally the primary function of a CDN.

Re: Cloudflare crawl endpoint

#93
post #83

Earlier quoted context omitted.

Are you using the word "claim" to call them wrong or for a more confusing reason? Because I'm pretty sure they are not in fact wrong.

The distinction between a caching proxy and an origin server is pretty meaningless when you're serving static content, if you ask me.

There's a blurry line there, true.

On the other hand when a page is small and static enough that it's basically just a flyer, I also care a lot less about who hosts it.

Re: Cloudflare crawl endpoint

#94
post #65

Off-topic, but I'm having a terrible experience with Cloudflare and would love to know if someone could offer some help. All of a sudden, about 1/3 of all traffic to our website is being routed via EWR (New York) - me included -, even tough all our users and our origin servers are in Brazil. We pay for the Pro plan but support has been of no help: after 20 days of 'debugging' and asking for MTRs and traceroutes, they…

Do you think cloudflare is responsible for all of the network traffic routing in the entire world and can simply fix any problem even if it's on somebody else's network?

Re: Cloudflare crawl endpoint

#95
post #10

Is cloudflare becoming a mob outfit? Because they are selling scraping countermeasures but are now selling scraping too. And they can pull it off because of their reach over the internet with the free DNS.

Was it ever not one? They protect a lot of DDoS-for-hire sites from DDoS by their competitors. In return they increase the quantity of DDoS on the internet. They offer you a service for $150, then months later suddenly demand $150k in 24 hours or they shut down your business. If you use them as a DNS registrar they will hold your domain hostage.

Where can I learn more about the 150k in 24h?

Re: Cloudflare crawl endpoint

#98

Instead of "should have been an email" this is "should have been a prompt" and can be run locally instead. There are a number of ways to do this from a linux terminal. ``` write a custom crawler that will crawl every page on a site (internal links to the original domain only, scroll down to mimic a human, and save the output as a WebP screenshot, HTML, Markdown, and structured JSON. Make it designed to run locally in…

That'd be more like that draw an owl meme. Devil's in the details. Holy shit, there's so many details...

Re: Cloudflare crawl endpoint

#99

Earlier quoted context omitted.

Was it ever not one? They protect a lot of DDoS-for-hire sites from DDoS by their competitors. In return they increase the quantity of DDoS on the internet. They offer you a service for $150, then months later suddenly demand $150k in 24 hours or they shut down your business. If you use them as a DNS registrar they will hold your domain hostage.

Where can I learn more about the 150k in 24h?

I imagine it's referencing this story:

https://robindev.substack.com/p/cloudflare-took-down-our-web...

HN Discussion:

https://news.ycombinator.com/item?id=40481808

Re: Cloudflare crawl endpoint

#100
post #53
post #17

Earlier quoted context omitted.

no? it takes 10 seconds to check: > The /crawl endpoint respects the directives of robots.txt files, including crawl-delay. All URLs that /crawl is directed not to crawl are listed in the response with "status": "disallowed". You don't need any scraping countermeasures for crawlers like those.

So what’s the user agent for their bot? They don’t seem to specify the default in the docs and it looks like it’s user configurable. So yet another opt out bot which you need your web server to match on special behaviour to block

Isn't this covered here? https://developers.cloudflare.com/browser-rendering/referenc...
Post reply on HN