News for hackers. Stuff that matters.
Re:Show HN: Ghuser.io – Complete GitHub profiles by lourot on Monday September 10, 2018 @10:10AM (#17951897)
OP again, we're way overloaded. We got 200 profile requests already in an hour and we didn't see it coming. We're extremely thankful and sorry to disappoint you at the same time. We're closing the "Get your profile" feature for now. Spinning up many EC2 instances to process the 200 profile requests faster in parallel as we speak. And we'll come back soon with a system that can handle this load.

Many many thanks!

Re:Show HN: Ghuser.io – Complete GitHub profiles by KenanSulayman on Monday September 10, 2018 @10:29AM (#17952042)
Isn't 200 requests in an hour ... just three requests per minute? What is this service doing?
Re:Show HN: Ghuser.io – Complete GitHub profiles by brillout on Monday September 10, 2018 @10:36AM (#17952097)
GitHub's API does't provide the exhaustive list of all your contributions. Instead we crawl GitHub's website which is slow.

Details at https://github.com/AurelienLourot/github-contribs#how-does-i...

We are in talks with GitHub and they know that we are crawling GitHub.

Re:Show HN: Ghuser.io – Complete GitHub profiles by ChristianBundy on Monday September 10, 2018 @11:17AM (#17952401)
> Instead we crawl GitHub's website which is computationally expensive

I'm surprised to hear that you're bottlenecking on CPU time. Could you verify that my understanding is correct? I would've thought your bottleneck would be networking and connectivity as you have to wait for GitHub to process all of the requests.

Re:Show HN: Ghuser.io – Complete GitHub profiles by brillout on Monday September 10, 2018 @12:08PM (#17952758)
You're right. I edited my answer.

The GitHub's unofficial API we are using is slow and per IP rate limited. We spin up several servers to have several IPs to circumvent the rate limit.

(GitHub knows that we do that and we are in contact with them.)

Re:Show HN: Ghuser.io – Complete GitHub profiles by exikyut on Monday September 10, 2018 @09:45PM (#17956602)
If GitHub are okay with you using multiple IPs to get that data then it's not inherently expensive on their side for you to be using this.

Surely a rate-limit exception could be in order, then?

And perhaps you could help them alpha-test a new API endpoint that just so happens to include all the info rolled up as one URL :D

(Hmmmmm.... GraphQL....)

Re:Show HN: Ghuser.io – Complete GitHub profiles by rjacksonm1 on Monday September 10, 2018 @11:37AM (#17952543)
Looks like they're hitting a GitHub rate limit, rather than bottlenecking on CPU.
Re:Show HN: Ghuser.io – Complete GitHub profiles by lourot on Monday September 10, 2018 @10:42AM (#17952152)
this is the bottleneck: https://github.com/AurelienLourot/github-contribs

It uses a very slow non-official GitHub API and so it takes several hours to do the initial crawling of one single profile, and is limited by IP so you need several machines/instances in order to parallelize. We plan to use AWS Fargate for the future. (We thought this future would be much farther away)

Re:Show HN: Ghuser.io – Complete GitHub profiles by iokanuon on Monday September 10, 2018 @10:35AM (#17952093)
Maybe it's cloning all GitHub repos of a user to compute activity?
Re:Show HN: Ghuser.io – Complete GitHub profiles by brillout on Monday September 10, 2018 @11:01AM (#17952295)
We don't clone repos. Instead we use GitHub's API to get activity info.

E.g. https://api.github.com/repos/aurelienlourot/ghuser.io/contri...

Re:Show HN: Ghuser.io – Complete GitHub profiles by sam0x17 on Monday September 10, 2018 @05:29PM (#17955373)
Would it be practical to use puppeteer / headless chrome from within a Google Cloud Function to do this? Then you could do literally millions of profiles per hour. The only requirement is that it never takes more than 540 seconds for any one profile, and that you could work around if you write in the ability to export the execution state and send it off to a new function invocation if you are close to the deadline. This seems like a much easier problem if you can get out of VPS land and into lambda/cloud functions since its something like $0.00001 per invocation.

https://cloud.google.com/blog/products/gcp/introducing-headl...

Re:Show HN: Ghuser.io – Complete GitHub profiles by gitgud on Monday September 10, 2018 @09:07PM (#17956437)
That's amazingly cheap, but would each puppeteer instance have its own IP address? They're being rate limited on each IP.
Re:Show HN: Ghuser.io – Complete GitHub profiles by sam0x17 on Tuesday September 11, 2018 @01:42AM (#17957427)
I would think you get a random IP as they have millions of worker nodes, but I don't know.
Re:Show HN: Ghuser.io – Complete GitHub profiles by sethish on Monday September 10, 2018 @01:19PM (#17953371)
You may want to delete my profile request, I have somewhere between 50k and 60k repositories and it tends to crash services. (user: sethwoodworth)
Re:Show HN: Ghuser.io – Complete GitHub profiles by lytedev on Monday September 10, 2018 @01:29PM (#17953443)
Haha! That is amazing! How, exactly, do you have so many?!
Re:Show HN: Ghuser.io – Complete GitHub profiles by ishanjain28 on Monday September 10, 2018 @01:46PM (#17953540)
Can we clone the repo and run it locally on my own profile? I arrived late..
Re:Show HN: Ghuser.io – Complete GitHub profiles by brillout on Monday September 10, 2018 @02:05PM (#17953680)
Not currently but we are thinking about it, see https://github.com/AurelienLourot/ghuser.io/issues/103