Skip to content

Comment on HTTP Cats

Comments

Not saying I’d ever actually use this (though also not saying I wouldn’t lol), but what is the best practice for using external sources like this?

When using something like Unsplash I know they’ve got lots of resources and a good setup so calling out to their API seems safe enough.

But for a random service like this, I have no idea if they have the infrastructure to support a lot of calls. I don’t want to abuse a random service.

In this case I assume it is all behind a cdn and it’s no big deal for them.

But if you’re not sure and it turns out to be an important part of what you’re building, do you just setup your own cached version using varnish or something?

The instructions at the top of the page encourage you to hot-link directly to the images they host. It would be hard to say sending them a ton of traffic is "abuse" when they literally suggest you do that.

In general though hot-linking across domains like that is bad practice because the content on the other domain might change in a way you don't like. This was a pretty common practice for a while: https://tvtropes.org/pmwiki/pmwiki.php/Main/HotlinkedImageSw...

If those images turn out to be important to your project such that http.cats going down would be an issue, absolutely you should serve a copy of that content from your servers (assuming all the copyright licenses are in order).

I’ve been a big fan of this site since it was introduced to me when I first learned to code. But to your point, I can’t really imagine a scenario where it would become an ‘integral’ part of an project.

For use in development & testing, sure. Or just as a goof to one of your coworkers. Honestly, I’ll admit I’ve used it countless times over the years to refresh my memory on a particular code, while knowing I’ll get a nice giggle of from it.

But in the scenario you are asking about, in an important production environment, you would be wise to cache the images and serve them in your method of choice yourself. Or better yet, just clone the repo and add install it on your server. It’s MIT licensed, so no worries as far as getting in trouble. Problem solved! :)

Considering the license seems to be MIT https://github.com/httpcats/http.cat you could probably just host the images yourself (or on your CDN/etc)

MIT is a software license. Does it even give you rights to the images? Also I'm not positive that the owner of that repository was the one who created all of those images.

Ah I missed the GH link, that does seem like the right move in this case.

Is Cloudflare capable of serving 67 jpegs?

My question is more generic. Not for this specific service, but for any random service you don’t have good visibility into how they run it.

Good point, I use http://butt.holdings quite often and never thought to check.

Headers say they're running varnish, so it's probably safe to keep using it.

Amazing, gonna have to add that one to the list of great single purpose sites.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.