News for hackers. Stuff that matters.
Re:How I Built a Side Project by overcast on Friday January 08, 2016 @10:12AM (#10865368)
$225 premium!? I mean come on. The article focuses a lot on the learning aspect of these exercises, and setting up your own services should really be a part of it. Especially for a one man operation. Typing apt-get install mongo / mysql / rethinkdb after the droplet is really all there is to it.
Re:How I Built a Side Project by wuliwong on Friday January 08, 2016 @10:29AM (#10865498)
My experience as a one man operation is that you always have to make trade offs between building something yourself (especially if you actually need to learn a new skill-set to do it) and using someone else's solution. Honestly, in general this is essentially always the debate even at my regular job.

For me, Heroku has always been the choice over AWS or Digital Ocean. I haven't had it block me from doing anything I've wanted to do and my monthly bill is around $10 (for multiple sites). For my projects, I could never make a solid argument that moving away from Heroku would actually change the product for the end user in any meaningful way. And with the greater amount of time and energy I would need to focus on a non-Heroku server-side, it would likely slow progress.

Re:How I Built a Side Project by overcast on Friday January 08, 2016 @10:38AM (#10865572)
Honestly, I don't really care what you use if it fits your needs. The main point here is that the author shut down his project, because they were spending $250 a month, to operate a very basic setup. Pick your favorite host, but a car payment to do so, is ludicrous.
Re:How I Built a Side Project by mod on Friday January 08, 2016 @02:06PM (#10867330)
I use both. I have a side project deployed to Heroku and it's fine there, but it costs me about $45/month. The same project would often have a better response time (when heroku sleeps the dyno) if it were hosted on DO, and both would require no maintenance (I haven't edited a line of code in ~2 years). It's a django/postgres setup, nothing special, and would run on the smallest DO instance.

I'm just too lazy to switch it over, honestly. I don't think it's a difference between "building it myself" and "using someone else's solution." It's about an hour of setup, maybe 2 if I encounter headaches. I probably ought to do it, given it'll earn me $35-40 per month forever.

Re:How I Built a Side Project by elithrar on Friday January 08, 2016 @12:11PM (#10866404)
> Typing apt-get install mongo / mysql / rethinkdb after the droplet is really all there is to it.

It's clear that the author was overspending—even a small dyno with a resource-hungry language like Rails can do a lot of traffic—but there's a lot more than just installing a web server, DB. Firewalls? WAL-E backups? Monitoring (of any kind)? A correct TLS setup? DB security?

Setting those up—in a way that you can replicate if the box is hosed—is a whole 'nother side project unto itself. Learning Ansible, Salt, etc. is great, but if your goal is to build X thing as a side-project, you'll never get anything done in a timely manner if you start reinventing wheels.

Re:How I Built a Side Project by overcast on Friday January 08, 2016 @12:20PM (#10866463)
Sure, but most (all) virtual setups have automatic snapshots, and backups for a few bucks a month. The rest you mentioned, you SHOULD learn if you're getting your hands into web services. What happens when something goes wrong, who is fixing it if you have no idea how any of it is running? I guess I'm old school. You learn the basics first, and build upon it. It's not reinventing any wheel.
Re:How I Built a Side Project by waffle_ss on Friday January 08, 2016 @12:47PM (#10866679)
Before I quit using DigitalOcean, I enabled backups and found they were very spotty - occurring roughly weekly, but not on a predictable schedule (8 days, 6 days, 4 days, seemingly random). Not something to rely on in place of a real database backup policy (more like an emergency backup of last resort).

Plus, they recommend against[1] enabling backups for I/O heavy VMs (so, databases) because of the copy-on-write implementation and its effect on I/O performance.

I ended up going to AWS because I was tired of having to string together a web of iptables rules (e.g. when you provision a new webserver VM you have to iterate over your Postgres, Redis, HAProxy, Elasticsearch, etc. VMs to poke holes in their firewalls), setup WAL-E and monitoring it / testing backups, setup 3rd party monitoring VM resources for issues (CPU/memory/disk space), having to manage package updates and security fixes, aggregating logs to a 3rd party with rsyslog, all that stuff.

Unless your app is a complete throwaway that you don't care about getting hacked or losing all your data, you quickly have to start worrying about this stuff and it becomes a huge burden to roll it yourself on VPS providers.

[1]: https://www.digitalocean.com/community/tutorials/understandi...

Re:How I Built a Side Project by overcast on Friday January 08, 2016 @01:18PM (#10866936)
I'm not in any way pushing the DigitalOcean setup. It was just cheap, easy to use, and offered FreeBSD as a host. I don't get spammed by them, no reliability issues, so I really don't have a reason to move at this time. If a project of mine gets too big, I'll evaluate then. But they are good for iterating lots of new ideas quickly.
Re:How I Built a Side Project by mcone on Friday January 08, 2016 @10:20AM (#10865438)
I'm a former Linode employee, so you don't have to sell me on the advantages of the VPS. :) I think we need to remember that people new to programming don't know about all of the available tools and services. Costs could have been reduced by using a VPS, but they also could have been reduced without becoming a *nix expert. For instance, the author talked about buying SSL certificates, something that comes free with a CloudFlare account. They could have also used a CDN to reduce the load on their dynos.
Re:How I Built a Side Project by wuliwong on Friday January 08, 2016 @10:38AM (#10865580)
I've had a site running on Heroku that has 200-300 visitors a day for almost 2 years. I'm still on the free dyno package. I wonder if I am just below some tipping point where I would need to bump up to the non-free stuff. My site runs fine and there are never spikes of traffic, it's pretty constant all throughout a 24 hour period.
Re:How I Built a Side Project by wuliwong on Friday January 08, 2016 @11:01AM (#10865777)
@detaro, couldn't reply directly to your comment but so far they haven't charged me. They sent me a note saying that eventually I would be charged but maybe they got enough backlash that they decided to grandfather in the old dynos?
Re:How I Built a Side Project by overcast on Friday January 08, 2016 @10:58AM (#10865745)
Your last sentence answered your question. Scale when it's a problem.
Re:How I Built a Side Project by detaro on Friday January 08, 2016 @10:57AM (#10865739)
Did they grandfather "old" free dynos, or can you live with the forced off-time?
Re:How I Built a Side Project by cpursley on Friday January 08, 2016 @01:36PM (#10867085)
I don't regret a single penny I send to Heroku every month. It's just worth it for smaller to medium-sized projects when you don't have in-house dev-ops. Especially so for side projects when time is scarce.

I've attempted a number of times to bootstrap up my apps on DO, AWS, docker stuff, etc - all in anger. The Heroku tax is less than the time spent configuring, maintaining and monitoring my own servers.

In economic terms, this is called opportunity cost. That's time I could spent building features or playing guitar.

Re:How I Built a Side Project by danneu on Friday January 08, 2016 @11:15PM (#10870067)
The problem wasn't that they used Heroku.

It's that they didn't exercise the sort of thrift possible with a website that has no users, and I'd wager that they didn't really know how to since they were a tenderfoot. I made similar mistakes as a beginner, paying too much for too little for things I didn't know I didn't need.

Heroku saves a lot of time for the 1-2 dynos ($25-50/mo) you need to vet your idea. With free Cloudflare SSL termination and a $5/mo t2.micro Postgres database, what else do you need?

For comparison, my somewhat popular forum with 257 online users at the moment and 300k req/day runs on 2 dynos. $50/mo for the application servers + a deploy/config solution is nothing.

Re:How I Built a Side Project by jacquesm on Friday January 08, 2016 @10:20AM (#10865439)
> Typing apt-get install mongo / mysql / rethinkdb after the droplet is really all there is to it.

This is one of the reasons why web security is as bad as it is.

Even so heroku is not the right choice for this, way too expensive.

Re:How I Built a Side Project by overcast on Friday January 08, 2016 @10:36AM (#10865558)
That is not relevant to this discussion, but I agree security should be a priority when developing anything.
Re:How I Built a Side Project by samsolomon on Friday January 08, 2016 @10:42AM (#10865618)
Curious what you think the right choice for this is? Appfog, EngineYard?
Re:How I Built a Side Project by jacquesm on Friday January 08, 2016 @11:06AM (#10865823)
Of those three (Appfog, EY and Heroku) I'd probably pick appfog, they have the simplest pricing model and the least chance of surprising you with some insane bill.
Re:How I Built a Side Project by ssewell on Friday January 08, 2016 @02:33PM (#10867546)
Not to mention DigitalOcean has excellent tutorials for beginners looking to set up quickly, like this one https://www.digitalocean.com/community/tutorials/how-to-inst...
Re:How I Built a Side Project by wuliwong on Friday January 08, 2016 @10:42AM (#10865617)
@overcast For some reason I couldn't reply to your last comment but yea, absolutely, $225/month is ridiculous.
Re:How I Built a Side Project by mintplant on Friday January 08, 2016 @01:22PM (#10866959)
If the "reply" link doesn't show up in the thread view, try going to the comment's permalink page (by clicking on the timestamp).