News for hackers. Stuff that matters.
Re:Host Your Own Content by TeMPOraL on Tuesday April 11, 2017 @06:09AM (#14086302)
For websites, at least, this can be partially worked around if you stop doing stupid shit. Just don't put 1MB of JS and a 10MB hero image over an article if all you want is to deliver text communicating a message.

Maybe at 29 I'm an old curmudgeon now, but right now I'm building a new website + blog for myself, with a simple, typographic layout, 100% static HTML, and as little CSS and JS as I can get away with. Right now a full article (no images) is about 28KB transferred, including a 11KB CSS framework I'll probably cut in half before even minifying it. The assumption now is that >50KB for a page (excluding images) means I've failed.

Re:Host Your Own Content by theandrewbailey on Tuesday April 11, 2017 @09:46AM (#14087661)
> For websites, at least, this can be partially worked around if you stop doing stupid shit. Just don't put 1MB of JS and a 10MB hero image over an article if all you want is to deliver text communicating a message.

Stupid shit... like hosting a video on S3, or really any static website asset on S3.

Re:Host Your Own Content by llccbb on Wednesday April 12, 2017 @11:49AM (#14098847)
There is lots of discussion about hosting static assets like images or videos, where that _asset/media is the content_. I am wondering what the best self-hosting solution is for these cases.

Let's say I am a photographer and I want to create or share some image galleries. Each image is big, about 10 MB and there may be hundreds of these images (less than 1000). They have a very permissible license, and I want them downloaded and used as wallpapers, for instance. I want the webpage traffic on my site (over flickr) because I want to drum up business and recognition for myself, but I don't want to risk my site going down under hug of death situations. Low cost solutions are ideal because this is a side project.

Is it best to host the main site on a single server (DO droplet) and kick the heavy lifting of image transfer to someone like imgur? What is the cheap and robust solution to this sort of problem?

Re:Host Your Own Content by adrianN on Tuesday April 11, 2017 @06:58AM (#14086520)
In general I agree, but you can't do much when you really want to host a video or an image gallery. Those things are big, nothing you can do about it.
Re:Host Your Own Content by rmc on Tuesday April 11, 2017 @07:59AM (#14086839)
You have a point with JS etc. But what can you do about a video? Only include a 320x260 video in 16 colours?
Re:Host Your Own Content by lelandbatey on Tuesday April 11, 2017 @01:36PM (#14090431)
Assuming video isn't your main source of content, you probably aren't looking to share a very long video. I just ran a test, encoding the first 30 seconds of a larger video into a 720p MP4 with ffmpeg (with CRF of 28), and the output video is 2.9 MB. That's 1 MB smaller than all the content sent over the wire just by visiting the Medium front page.

But, let's say that you're distributing a 10MB video with your textual content, and your post does get lots of attention and suddenly you need to transmit 30,000 copies of that video. Let's also say that you decided to use a CDN to host your larger static content, such as videos.

In such a situation, you know how much that 30000 visitors cost you? According to CDN Calculator[0], it will cost you, on the low end, $18 that month, and if you where using Amazon Cloudfront as your CDN, it would cost you $30 that month.

If you're more price sensitive though, you could easily use a Digital Ocean[1] droplet as your sole content source, and in that case it would cost you a whopping $5 that month, as each droplet comes with 1TB of network traffic per month. If that's not enough you could switch to a SoYouStart server[2] for $40 a month, each of which has a monthly bandwidth allowance of 250 Mbps, which is 78.3 TB of bandwidth per month.

So no, you probably don't need to resort to 320x260 video in 16 colors : )

[0] - http://www.cdncalc.com/

[1] - https://www.digitalocean.com/products/compute/

[2] - https://www.soyoustart.com/us/essential-servers/

Re:Host Your Own Content by onion2k on Tuesday April 11, 2017 @07:00AM (#14086526)
The point still stands. There is a direct cost to hosting your own content that scales with popularity. If your website is slashdotted/hugged to death/goes viral to the point where you go beyond the allocated quota of bandwidth that comes with your monthly hosting costs then you'll have to pay for that traffic. Hosting your content with a business who profits from it shifts that cost, and risk, from you to them. If you don't have much money then that's a really good thing. This is true even if you optimise the size of your website.
Re:Host Your Own Content by kijin on Tuesday April 11, 2017 @08:26AM (#14087021)
Even the smallest Digitalocean droplet comes with 1TB of bandwidth, and I'm not sure whether they charge extra for overages yet.

GP with his 50KB pages would have to get over 20 million views a month in order to use 1TB. Most of us who work in tech can probably afford to upgrade to a larger droplet if that happens.

Hosting your own content isn't free, but it doesn't have to be very expensive, either.

Re:Host Your Own Content by brightball on Tuesday April 11, 2017 @09:16AM (#14087390)
Exactly. The math on digital ocean is strong. I've got a lot of credit with them from a few blog posts that got popular and I still host my blog on a $7 / month Heroku hobby dyno right now with unlimited bandwidth.

The entire reason that I do it myself though is because my blog is what I use for random technology experiments, so I get some value out of that.