Settings

Theme

Ask HN: How fast can you hit all 34M items in Hacker News Firebase API?

8 points by marsupialtail_2 3 years ago · 5 comments · 1 min read

Reader

This could be a nice benchmark for a http client. I wonder if anybody with experience with reqwest in Rust could chime in. Currently using aiohttp I can get around 1k requests/s from the Hacker News API, which means it will take around 9 hours to get all the items....

krapp 3 years ago

That depends entirely on your network latency and connection speed, doesn't it? I think a better benchmark for a client would be generating pages/threads, because HN's data structures are so suboptimal for that even HN itself sometimes has trouble with it. So take a super long thread like https://news.ycombinator.com/item?id=12907201 and see how long it takes to render it fully.

aynyc 3 years ago

I’ve done it maybe 2 years ago learning pythons asyncio. I remember the time is around 3.5 hours. I only perform the scrape maybe 5-6 times over a week to avoid overloading the server.

avinassh 3 years ago

If it makes your experiment any easier, I have written a hacker news API wrapper in Python - https://github.com/avinassh/haxor

sc90 3 years ago

Isn't it rate limited?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection