How I built ghit.me, hit count badges for GitHub
In this technical retrospective (2015), @benwilber0 shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.
Core Principles for Independent Builders:
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:
HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.
CATEGORY Frugal Engineering →
HISTORICAL ERA Cloud & Mobile Era (2014–2019)
COMMUNITY SCORE 55 points
TOTAL DISCUSSIONS 18 comments
If you ever wanted to filter by IP so you don't end up with tons of duplicates, it would be a nice usecase for the native hyperloglog support in Redis:
http://antirez.com/news/75 ↗
http://redis.io/commands/pfadd ↗
http://redis.io/commands/pfcount ↗
For anyone that is unaware, "hit count" functionality has been present in GitHub for at least several months. If you're the owner of a repository, you can view it at https://github.com///graphs/traffic ↗ which gives you a breakdown of visitors, clones, referring sites, and which pages within your repository are popular.
If anyone's trying to use ghit.me - beware that api rate limit from github is preventing the tool from working. May be, try again:
``` { "message": "API rate limit exceeded for 107.170.25.70. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", "documentation_url": "https://developer.github.com/v3/#rate-limiting" ↗; } ```
How does this deal with GitHub's caching of images?
https://github.com/blog/1766-proxying-user-images ↗
They refer to it as "proxying", but they also call out that it proxies using their CDN, which seems to imply there isn't a 1:1 relationship between user requests and hits on the backend server
nice. I just added it to my hackernews chrome extension repo: https://github.com/boomeasy/hnlinks ↗ perhaps it will reach double digits by next year :-)