logoalt Hacker News

andai • today at 5:18 PM • 1 reply • view on HN

Interesting, thanks for sharing.

>So I took a look at some data. I added top-level logging for every endpoint (how many times was a request made to each url path), and I found that a majority of the requests did not even make an attempt to fetch news articles! For reference, my website is built as a single-page-application, and what this means is that a majority of the requests did not even run the javascript necessary to render the page (!).

So you got hammered by curl requests! But isn't that part of your delivery static anyway? Were you regenerating the same HTML over and over?

>many, many requests per minute?

How many was it?

Also interesting that it was a single "user". (user-agent?) Did it come from a different IP every time?

But hey. Silver lining: free load testing! ;)


Replies

sammy0910 • today at 5:59 PM

> So you got hammered by curl requests! But isn't that part of your delivery static anyway? Were you regenerating the same HTML over and over?

i dont think this was the cause of the slowdown, it was just sort of the thing that led to the discovery that this was mostly bots.

in general, because the purpose of the website is to allow users to generate news feeds based on custom criteria, it does do a bit of meaningful work on each request (ones that do follow through and load the full page).

> How many was it? > Also interesting that it was a single "user". (user-agent?) Did it come from a different IP every time?

I'm intentionally leaving some of the details vague here, both because I don't want to be too harsh on the original author (it may have just been accidental/a buggy program/etc.), and because I don't want the traffic generators to know how im flagging them.