BlinkLink Post-Mortem: 50k pageviews, 700 blinks
clayallsopp.com"I stopped these at first with IP banning, and switched to Rack::Attack for throttling per-Twitter-ID."
I wonder what Twitter-ID he means. Is there an API to get a numeric ID for a given handle that stays the same even when you change your username? If he means the username, wouldn't it be possible to programatically change the username after each request and thus avoid the throttling?
Each twitter account comes with a unique numeric identifier in addition to your handle. If it didn't you wouldn't be able to login with twitter on some websites when you change your handle.
https://dev.twitter.com/docs/platform-objects/users
EDIT: After rereading your comment you might have been asking if it was possible to retrieve this id with a simple API call and not with OAUTH. It is possible with "users/show" as explained here: https://dev.twitter.com/docs/api/1/get/users/show
Thanks, good to know. Though in the current version of the API (1.1), there is a rate limitation of 180 requests/15m (https://dev.twitter.com/docs/api/1.1/get/users/show), which could become a problem quite quickly on a website of that scale.
The rate limit is done against the user's access token, not the server itself. A billion users gets you 180 billion requests in 15 min.
An interesting titbit of information from this post is the approx. # of visitors reaching the front page of HN can get you:
"BlinkLink managed to get about 50k pageviews against 17k visitors"
I'm not sure on how much other sources (Reddit, Twitter) contributed to that number though.
From my articles that have hit the top 10, 50k pageviews with a little bit of virality seems reasonable.
You can roughly estimate the amount of visitors on a front-page HN post by 1 point :: 100 unique visitors. In this case, (17k visitors on 138 points), visitors viewed the page 3-4 times, which is unusual.
>visitors viewed the page 3-4 times, which is unusual. well, this had the bizarre counting effect that had some people refreshing a lot to see how fast it was going down or if anyone was tweeting it to make it go back up etc.