9 ms·
1. Heroku is expensive. Odds are you can get the exact same virtual/hardware specs with a cheap VPS from Digital Ocean or Linode or any of various other provide
by meowface 12y ago
1. Heroku is expensive. Odds are you can get the exact same virtual/hardware specs with a cheap VPS from Digital Ocean or Linode or any of various other providers. It'll require a tiny bit more setup and configuration on your part, but it'll save you money. You could also consider shopping around lowendbox.com and lowendtalk.com to find the best current deals.
2. Optimize your application so that you won't need to scale via upgrading or adding new hardware for a long time. Be mindful of your database queries, cache things in the application itself, and use a caching web server like nginx as well. Only upgrade or scale to multiple servers if you've optimized everything as best you could at all the software layers and yet you're still experiencing more traffic load than you can deal with.
I've run medium-traffic sites and applications off of $5 and $10/month VPSs by following those 2 steps, with consistently good and stable performance and latency. My guess is that if you order a cheap VPS from the start and do everything else right, you'll find that it'll scale just fine for years and you won't ever need to leave it.
3. Have a donation banner and if it fits okay with your application, place ads.
- opendais 12y agoThis. Very much this. That said, I wouldn't trust lowendtalk.com too much if you want stability. If you are seriously contemplating a $300 budget, you can get away with $60 on Linode or Digital Ocean and have much, much better stability compared to some of the providers there. If stability isn't a big issue for you [e.g. 95% uptime is okay] then you can go with those providers. That said, I wouldn't rely on a donationware model to bring in enough money unless it is less than $100. I know some sites that do function that way (mainly forums with strong communities) but generally they can't raise more than $100/mo reliably.
- xur17 12y agoI agree with the lowendtalk bit - I previously switched between 2 or 3 providers on lowendtalk, and I even had issues with one of the larger / more reputable ones on the site. Digital Ocean or Linode won't cost you that much more, and the stability will be worth it. I've been running a pretty popular site off of a $5 / month digital ocean box with no issues for over a year now. Does Heroku have this large of a markup generally, or is the op just overconfiguring?
- meowface 12y agoAs far as I can tell, all of Heroku's plans beyond their free tier have quite a lot of markup.
- ProblemFactory 12y agoHeroku is expensive because of their markup, but more so because their platform forces everything to be separate managed, modular instances whose costs add up fast. * Want a web server instance that doesn't get shut down between requests? Then get at least 2 web dynos at $35/month each. * Want to run background jobs that are longer than 30 seconds? Then get a separate worker dyno at $35/month. * Want a database with more than 10K (!) rows? That's at least $10/month. * Want a memcache? That's $15+/month. And so on. For a small to medium popularity site, all of these could be combined into one VPS on traditional cloud hosting. Heroku would make sense for a startup that has plenty of cash and limited developer resources (-> buy fully-managed-everything), and knows it will need to scale to tens or hundreds of servers to handle traffic very soon. But for most hobby webapps, a single VPS somewhere else will be 10x cheaper and good enough for a long, long while.
- mattgibson 12y agoIf you enable the free New Relic add on and turn on availability checking, then the pings it sends every 60 seconds keep the dynos from ever being shut down. Also, if you're using Rails, switching to Unicorn as the server allows 3-5 concurrent requests, so you can get quite a bit out of the one free dyno if you don't use the standard config.
- rajivm 12y ago* minor correction to the above -- the first dyno is "free", so you only need to pay for one $35/month dyno to get 2 web dynos that don't get shut down
- tempestn 12y agoEven beyond medium popularity (depending on the type of site of course), you can move from a VPS to a dedicated server and handle quite a bit of traffic before you would need to use multiple boxes. (At least with some basic sysadmin skills, like using nginx instead of apache, or at least switching apache to the worker or event mpm and configuring it appropriately.) The next step from there could be moving the database to a separate server. You can get quite a ways without even worrying about load balancing/proxying/mirroring/etc.
- thaumaturgy 12y agoThis is the approach I would take too, but I'm not sure I would recommend it. The downside to Linode, Digital Ocean, et al is that you'll have to spend more of your time doing sysadmin work. If you're not already an experienced sysadmin, figuring out how to get the pieces playing nice with eachother can easily take up more than $300/month of your time. And, once you're done with the setup, you're still not done: you have to stay on top of log files, watch for abuse, keep software up-to-date. And and, if you've never done this before, you won't know what you don't know. (Pop quiz: you've never done sysadmin work before, what's the correct way to configure sshd? Bonus points: if you use MySQL, what's the first command you should run right after package installation, that nobody runs?) I like sysadmin work, I consider it to be an important part of my software stack. But I'd be reluctant to tell anybody else that they should spend their time on it, too.
- tempestn 12y agoYou can get around some of these issues if you use a control panel like cpanel. (Although as you get further from the old-school LAMP stack the complexity starts to return.) Regardless, in the early stages, when you're just trying to determine whether there's a market for your product, there's a fairly low bar for system administration. As long as it works, it's probably good enough. Even security (beyond the most blatant things) can probably wait until you've got some revenue, since it's very unlikely you'll be subjected to a targeted attack before anyone has even heard of you.
- thaumaturgy 12y agocpanel has a loooooong history of security issues. It's probably the single most vulnerable part of any hosting company's infrastructure. ISPConfig is probably better, but it too has had some issues (http://www.exploit-db.com/exploits/29322/ http://www.exploit-db.com/exploits/29322/). There's a fairly low bar for system administration for "just getting it to work", but a really long upward curve from there to "properly managed". For example, backups (which typically require some special handling for Postgres and MySQL). Also, if you store any user data at all, you're kind of obligated to make sure it's safe. You kinda want to have automated DB backups and data safety even if you're using Heroku, but doing your own sysadmin might add to the effort required to get it all working right. You're right for the most part that you're not likely to see much in the way of targeted attacks, but be careful not to discount the number of automated attack systems that are out there now. Within a minute or two of bringing a server online, I begin to see hits for spam, ssh, and root password attempts from around the world. It's sort of amazing really. None of these are likely to go very far on a default install, but if for example you decide to set up an MTA so that your application can send you (or your users) email notifications, it's easy to goof up a sendmail config and end up with an accidental open relay. Maybe another way to put this is, Heroku charges that much because they provide that much value to people who don't want to deal with this stuff. I prefer to deal with this stuff myself, but a lot of other people don't, and I can't say they're wrong.