News for hackers. Stuff that matters.
Re:Show HN: Hacker News Title Edit Tracker by codetrotter on Saturday November 23, 2019 @07:48PM (#21617616)
What frequency of sending GET requests to the servers of HN is an acceptable rate for a bot? I tried to look for an answer on this but didn't find any.

In the past I got the IP of my server banned from accessing HN for sending too many requests in too short of a time span. I found the unban interface that you provide, lowered the request rate of my crawler and tried again but was still sending too many requests in a limited amount of time and got the IP of my server banned again. If I recall correctly, I got it unbanned a third time and lowered the request rate even more but then got banned again and then I think it would not allow automatic unbanning.

Don't remember if I just gave up at that point or if I sent an email about it, or if I just waited some amount of time if there was a statement about how long I would have to wait before being able to use the unban interface for the IP of my server again.

Anyway, an official answer about the acceptable request rate would be nice. Perhaps put it in the FAQ?

Also, if people doing automated GET requests were to create a unique UA string for their scrapers that include a way for HN staff to get in touch, like for example (but with actual names of bot and site)

    Examplebot/0.95 (+http://www.example.com/bot.html)
where the page on that URL would list an e-mail address for getting in touch, as well as having a statement about how to verify that a given crawler belongs to that service, would that help in not getting server IP banned automatically?
Re:Show HN: Hacker News Title Edit Tracker by dang on Saturday November 23, 2019 @07:55PM (#21617639)
Once per 30 seconds. That's in our robots.txt: https://news.ycombinator.com/robots.txt. We've been working for a long time on (edit: what we expect to be) some serious performance improvements that might allow us to relax that limit. For now though, HN's process still runs on a single core and we don't have much performance to spare.

If you need more than that, you should use the Firebase-based API (https://github.com/HackerNews/API). The public dataset is also available as a Google BigQuery table: https://bigquery.cloud.google.com/dataset/bigquery-public-da....

Edit: since this subthread is not really on topic I detached it from https://news.ycombinator.com/item?id=21617478.

Re:Show HN: Hacker News Title Edit Tracker by Havoc on Saturday November 23, 2019 @09:27PM (#21617975)
>single core

Instead of further optimizing the already light design surely it would be easier to do a gofund me and get a server upgrade? I certainly wouldn't mind chipping in a buck or two if it relaxes limits.

Re:Show HN: Hacker News Title Edit Tracker by tedunangst on Saturday November 23, 2019 @09:47PM (#21618021)
YC is not actually a non profit charity, FYI.
Re:Show HN: Hacker News Title Edit Tracker by jdsully on Saturday November 23, 2019 @09:42PM (#21618002)
I think the problem is more the software is single threaded. I’m sure YC can afford more than a single core machine.
Re:Show HN: Hacker News Title Edit Tracker by dang on Saturday November 23, 2019 @09:53PM (#21618045)
The software is multi-threaded but it runs on a platform (Racket) which implements that as green threads, meaning it runs them all on a single core.
Re:Show HN: Hacker News Title Edit Tracker by Havoc on Saturday November 23, 2019 @10:02PM (#21618077)
ah. That makes a lot more sense than hn being short $100. Thanks for modding.
Re:Show HN: Hacker News Title Edit Tracker by soegaard on Sunday November 24, 2019 @09:14AM (#21620543)
Note that Racket besides threads also has places, which allows programs to use more than one core.
Re:Show HN: Hacker News Title Edit Tracker by arthurcolle on Saturday November 23, 2019 @09:04PM (#21617895)
Single core! Raspberry Pi 4? ;)
Re:Show HN: Hacker News Title Edit Tracker by stoops on Saturday November 23, 2019 @09:01PM (#21617888)
Oh. Single core.

That's...sad.

Re:Show HN: Hacker News Title Edit Tracker by bigiain on Saturday November 23, 2019 @09:22PM (#21617963)
I disagree.

I think it's awesome that there's a site this popular out there that _doesn't_ run on resume-fashionable Google/Facebook scale infrastructure that it does not require.

"Yeah boss, we're going to have to pull out memcached and replace it with a kubernates cluster of MongoDB shards. For 'reasons'..."

Re:Show HN: Hacker News Title Edit Tracker by shocks on Saturday November 23, 2019 @09:23PM (#21617965)
Why?
Re:Show HN: Hacker News Title Edit Tracker by petercooper on Sunday November 24, 2019 @12:58PM (#21622064)
BTW, you don't need to hit HN to create something like this. I'm using https://hacker-news.firebaseio.com/v0/topstories.json and https://hacker-news.firebaseio.com/v0/newstories.json to get the latest story IDs.. then https://hacker-news.firebaseio.com/v0/item/ID-GOES-HERE.json to get the titles.