Ask HN: Heroku or Not?
Hi...My team does not have experience in setting up a server. I mean a production server. We are thinking about using heroku, because it removes the system admin. Heroku is costly compared to the setting up a server. So can you guys please give your opinion about using heroku or not?
Thanks :) Wow, lots of heroku praise here. Let's put that a bit into perspective. Heroku is indeed great for starting out when you can get away with the free plan or need only a small number of dynos and ideally none of their addons. Heroku can be a beautiful launchpad during the bootstrap phase. Once your heroku bill approaches about ~$500/month you should start looking elsewhere, though. Their pricing for larger deployments becomes outright hilarious above roughly that threshold. And with hilarious I mean really hilarious, as in the $3500 price point for a 50G memcached instance. For that money you can also buy a physical server with 64G RAM every month, fresh from the factory... Memory pricing for all shared/VPS hosting is simply bizarre. RAM is dirt cheap. I don't get it. It's almost like they all got together and decided to gouge on the one thing people need. It's this one factor alone that seems to make dedicated/colocation services a better option at about the point you mention. Memory pricing for all shared/VPS hosting is simply bizarre. Not really. DIMM modules are fairly cheap but DIMM slots are not. Your average mid-range server can, in theory, be maxed out to 192G or even 256G RAM. But only if you use 8G or even 16G DIMMs - and those are still hideously expensive. The most cost efficient configuration usually gravitates around 64G (16x 4G) nowadays, rarely higher. So, when you factor in the cost overhead per server (rackspace, power/cooling, network infrastructure, maintenance) then it's not hard to understand why RAM is the most expensive ressource in the cloud. So they gouge on the RAM but they generally give everything else at a very respectable price? Sounds reasonable to me. It's not too shocking actually .. If you're renting a $99/month server with 512MB of memory and 80gb of disk space, you're losing money on it unless it's an old, already amortized server. That RAM upsell might become all of the profit of that server.. also, limited ram and disk space means you can do less with your server, like use less power or less bandwidth. I agree - it's great to get started and get traction with an app but can become costly after a certain point. When I got to a point of needing several dynos, I went to Engine Yard which like Heroku takes care of all of the Amazon EC2 configuration. Also, with deploy hooks at EY, I have command line deployment similar to Heroku's "git push heroku master" by using a specific command in your commit message 'git commit -am "[deploy myapp_production]" and then 'git push'. Memcached is not run (or priced by) Heroku. That is an addon provided by a 3rd party (http://www.northscale.com/). In addition, there is absolutely nothing stopping you from running your own, separate memcached server and pointing your Heroku app there. If you host it on EC2, then you should have very low latency to Heroku. Heroku is obviously not perfect, but this particular criticism is not valid. That said, you can point this criticism at Northscale. Trust me, Heroku is not costly compared to setting up a server: $ git push master heroku is a lot cheaper then: Setup a machine. Then setup mysql, nginx, REE 1.8.6, or did you go with MRI 1.9.1? You're not gonna launch on Rails3 right? Because then you can't do 1.9.1, you have to go to 1.9.2. And you know how to setup nginx to pipe requests through to a Rails app. Are you going with Passenger or Unicorn? Oh make sure to bring up another machine to act as a MySQL slave. You know how to do that right? And you're dumping your DB to disk and backing up to S3 regularly right. Just write a simple script/cron job to handle that. And when you setup your machines you made sure to setup 2 so that if one goes down, the other will still be around, and you setup a load balancer that will realize when one of those machines goes down right? etc.... :) I could write a similarly disingenuous how-to on using linux and vi to write c vs writing visual basic on my HP desktop from costco. Is there a learning curve to mastering these things? Of course. But there is a huge reward in learning them. Otherwise, woe be unto you the first time you want to do something heroku does not allow (or gets acquired, or folds up, etc etc etc). Those aren't the same thing at all. You can't write C in visual basic. The guy you were responding to was comparing what it would take to get your application working with Heroku vs. what it would take to set up your own server providing some of the same services that Heroku does. If you were trying to set up a similar question, it'd have to be more like: "Should I use gcc or should I write my own C compiler?" Clearly the correct answer here is "Use gcc" if you're trying to get work done, but that doesn't mean nobody should ever write their own compiler, either. It's just not the right choice for most people, even though I'm sure there is a huge reward in learning how to do it. Visual Basic is Turing-complete, so you can write C with it. So is brainfuck. maybe I will! Exactly right - and even if you CAN setup your own VPS it doesn't necessarily make it a valuable use of your time. I've setup probably 3 slices for various projects and it's annoying/time-consuming enough that I use Heroku now. Also - their free plan levels the playing field a bit on price since it's free the entire time you are developing and up until you have a handful of users. On a VPS you pay up front for that. Setting up your own server gives you full flexibility as to your application architecture/tech stack. Want to go with Redis? Tokyo Cabinet? MogileFS? S3? A pile of files in a zillion small directories? something else? Your choice. If your startup has any challenging technical elements, I think having 100% full control over your app architecture is quite important. You can live without it, but it's a potentially costly trade-off. FWIW, judging by "My team does not have experience in setting up a server" I doubt OP is going to be playing with any of that stuff. Granted, but if your team doesn't have experience setting up a server, I question whether they have the required skills to run a startup's technology. A startup CTO should be able to set up a server reasonably quickly, effectively, and securely... Heroku doesn't stop you using Mongo, Redis or S3. They actually promote these things. I am a Heroku fan. Some things for you to consider:
1) The real value of Heroku is time savings. Their deployment mechanism is near instant, so your savings come from the time you are spending doing more development, rather than managing servers. If you wanted to hire an ops person, that's a cost savings. 2) Scalability. As your system grows, Heroku manages architecture choices necessary for scaling all parts of your app. This is at the dyno web tier and database tier. But it also includes choices around architecting add-ons. For example, if you wanted to include their memcache add-on and you had multiple apps, should you create multiple memcache instances or one large grid? That sort of choice is handled behind the scenes. 3) Add-Ons. They handle configuration, billing, and setup of any add-ons you might need. Biggest savings is not having to research all of them to figure out which ones are stable, viable, functional. 4) Cheap to get started. You can deploy new apps for free, and migrate your code elsewhere if needed. 5) Their polyglot strategy is interesting, and they are pushing the envelope with beta implementations around nosql data stores. There is a nice polyglot post on their blog. 6) There is some performance advantages of using some of their add-ons. Because Heroku is deployed on EC2, and many of the add-ons are also on EC2, the integrated performance can be higher. EC2 ping rates are faster than gigabit ethernet in some cases. 7) Creating identical environments. If you manage your own servers and you need to create staging, QA, or development servers, you'd have to create those manually and they'd be close, but not identical because there is different hardware involved. In debugging scenarios, being able to clone a whole app environment has some advantages. Good luck in your endeavor. BCC runs on a slice. A smaller client project runs on Heroku. I find Heroku requires less maintenance which is easy and more which is hard, like digging into Ruby gems to hack around why they are not working. By comparison, nginx configs and a thousand other things need to be done for VPSes, but the majority are straightforward or Googleable. Strong recommendation for the DIyer: deprec will save you a week. Heroku is probably really great as long as you are small. Once you get serious you can host much cheaper on your own machines, but there will be additional (hidden) costs to factor in because you'll be spending more time on doing all the stuff that Heroku does for you. That's their added value, super easy deployment and keeping your stuff up and running. Cost wise it is fine as long as you're small enough to not notice you bill as a 'significant expense'. When that happens you should look in to running your own server, maybe first a virtual one, then move on to a dedicated server. That should allow you to scale to quite impressive size without breaking the bank. Once you get big enough you might be able to negotiate with Heroku for a better deal. They might not be willing to give you au better deal, but if you're already there you might as well try before going through the expense of moving somewhere else. Here's my take: -> if time is more precious than money, go with Heroku. -> if money is more precious than time, go with Linode/SliceHost etc. You can change your mind later on (depending on scale increase cash etc), or even mix-and-match (eg: your workers on Linode, your front-ends on Heroku). Last point: some software (eg: sphinx) are not available on Heroku, and some others (eg: websolr) are quite costly compared to a roll-your-own setup. If money is more precious than time but you have a need for reasonably beefy servers, go with Hetzner: http://www.hetzner.de/en/hosting/produktmatrix/rootserver-pr... Maybe a dumb question, but my brief scan over there didn't see US Dollars or anything in American English. Do they have a US website, location or affiliate? Start with Heroku. It's actually quite cheap for low traffic. At the same time, buy a $20/month Linode. Start playing around with it by setting up toy web sites and web apps. If you don't have experience setting up a server, then it's important to be experimenting with one for a long time because it takes a while to learn things. For example, you not only have to install and configure all of the necessary software, you have to think about security and resource utilization (memory, CPU, disk). You also are going to want to set up some server monitoring software such as serverdensity.com. And you're going to want to get used to managing web traffic (reading Apache logs, tuning Apache for performance, etc.). All of this takes time. But if you do this then if the time comes for you to switch away from Heroku, you will have experience setting up and managing your own web server. I recently launched a small project (http://statusdashboard.com) with the goal of learning RoR and was blown away by the community and infrastructure (particularly Heroku). 3 weeks from watching the first blog railscast to a fucntioning site (with SSL, recurring billing, monitoring, etc.). I've also setup a VPS and started learning how to host myself (I think it is always better to understand how the magic happens). Heroku definitely hides the complexity of their "magic". It just seems to work so effortlessly. However, my biggest question so far is this: what is the best practice for managing and maintaining the DB? I'm used to jumping into the db for routine tasks, ad-hoc reporting, and troubleshooting. Amazon RDS would make it easier, but a bit pricy for my needs right now. I also understand you can db pull, but I've heard a few examples of data loss when attempting a pull/push roundtrip with a local PostgreSQL instance. So, I find myself spending time in the Heroku console, manipulating the data in code, manually. What do you do to manage/report on data in the DB? I'm preparing to launch a number of larger projects, but need to get a better system in place first. Hi - as an aside - I think it would be worth adding some 'tour' pages to your status dashboard site. I like the design but I'm not sure how the site works etc. Thanks for the feedback. I'll be working on that this weekend. I'm thinking of including a short video as well. I've used both Engine Yard Cloud and Heroku. They're both great and have their pros and cons. Both are also powered by Amazon EC2. The only major downside with Heroku is if there is any downtime within their infrastructure, your app will also go down. This has happened a couple of times in the last 3-4 months, and it took a lot of big sites down. Engine Yard Cloud setups are self-contained and can be locked down to whatever setup, cloud version you're happy with. If they update their cloud setup, you don't have to update your instance anymore. It also seems like you can get more "bang for your buck" with EY once you start needing more computing/db power I am totally in favor of Heroku. Like other folks have pointed out, it's far cheaper (at least at first) to scale up on Heroku than to hire an ops person. I think that outgrowing Heroku, or finding that your real costs would be lower by going elsewhere or buying hardware, is a good problem to have. I would much rather spend my time building my product than dealing with all of the fiddly bits of managing web servers, databases, full text search setup, security, patching, etc. If need arises, migrating off Heroku in the future shouldn't be too challenging. Also, if you do choose to try out Heroku, pick up my iPhone/iPad app for managing your Heroku applications (http://dopplerapp.com). Good luck! I love Doppler. Thanks for it! :) Glad you like it! Hit me up at aaron@structlab.com if you have any feature requests or bugs to report. I have v1.1 in the pipeline right now, and would like to incorporate a couple more user-suggested changes before I submit to Apple if possible. There is no lock-in using Heroku. Start with it and if you later want to move, just get a VPS of the appropriate size, apt-get install PostgreSQL, install RVM, and then the Ruby you want and required gems. Once you do this a few times, it takes very little time. As another poster mentioned, make sure you setup cron backups to S3, etc. Heroku is a great way to get your app up and out there quickly. Get in front of users and then iterate on your product. The perceived cost of Heroku won't turn out to be an issue until you've scaled out to many dynos. Don't fret optimizing your hosting bill until it gets large enough to be an issue! I like Heroku, but if you want your own server (so you don't have to pay for outgoing email or cron jobs or DelayedJob), you can set up an Ubuntu 8.10 server super easily with Moonshine. I gave a talk about it at SD Ruby a while back. http://jarinheit.posterous.com/a-talk-i-gave-at-sd-ruby-depl... Heroku is awesome for ruby development. If you're attempting node.js development, they do have a private beta (which I've tested), but is somewhat limited as I believe it uses an NGINX proxy so doing something like websockets with node.js (currently on Heroku) is not possible. git push master heroku is reason enough to give it a shot. Joyent may be another option... joyent is nice and their support is tops Use Heroku. The cost of acquiring or hiring the sysadmin knowledge is going to far exceed just using Heroku. This includes Heroku's main competitor, Engineyard. EY has its upsides (and downsides), but definitely requires more sysadmin experience. We did all manually before. Now we use heroku. For a small/medium sized project it is just perfect. We replaced about 1 to 2 days of works by 10 minutes with heroku. I cannot recommend it enough. It took only 3 hours to adapt our projects to heroku. Compared to many days working on hosting ourselves our projects. Because the longer is not to set up the environment but to choose what will be the best. I believe the heroku team made the best choice for me. Heroku's definitely easier to setup and use - it's usually the right choice when you're first starting out and/or you don't have any advanced needs. I don't use it much anymore - I stick to Moonshine and the Rackspace Cloud. The setup and management of a private slice is super easy and, IMHO, it's worth the small amount of extra work to setup. I think the most important thing is getting something up and running quickly because you don't know where the design of the system will lead and you don't need the distraction of setting up a server. Don't waste more than a week fretting over this issue. Even a week is too much! During development you can still consider this issue so it's not an either-or thing. You're still developing in rails and can easily move your system to a standalone server. You're just delaying the cost of hiring a system admin or training one while you spend your valuable time in creating a working system which is very valuable in terms of figuring out the design of it. Heroku is great for site that might work out and might not. The initial cost is zero, but you can scale out as needed. Hopefully youve structured your business properly so that herokus cost is a small percentage of revenue. Heroku is awesome. Not only does it work well, it also encourages best practices. Although I love Heroku, and it really is a great platform, I find that, for my startup and personal projects, the costs hold me back from doing some things. Say I need to run a simple background job, that would be $36/month - almost 2 linodes. And with the excellent articles on http://articles.slicehost.com, I find that setting up a vps takes no more than a few hours. Plus, it's a lot of fun and a good learning experience! I don't see how Heroku could do it much cheaper though, when you look at the pricing of Amazon EC2 instances which their platform runs on. Heroku is great. But, if you use something a bit outside ruby/add-ons (which is a lot, including NoSql databases, Apigee, and lots of other great services), you will need to move. Actually, Heroku supports all the popular NoSQL databases out of the box via their addon system. definitely use heroku if you are using a ruby framework. we've had a much better experience than with managing our own EC2 server or using RightScale Im a sys admin and have to administrate dedicated servers at work but choose to use heroku for personal projects just for ease of deployment. I recommend heroku for starting out and and getting your apps some traction or whatever, then if/when you make more money hire a sys admin and migrate to something else if you want. I really love heroku though, especially after setting up my own servers on media temple for rails apps (which sucks using passenger). Use Heroku is the simple answer. Unless you have specific needs for background processing or do some stuff that is not in Ruby, use Heroku. This is especially true if you have not set up a production system before. Definitely go with Heroku for two reasons: time savings (no sysadmin is huge!) and flexibility (you can always migrate later, which is easy since almost all of their stack is open-source). Question about heroku: I know that they have delayed_job support, but I need something that will kick off a DJ call every 5 minutes or so. The hourly cron add-on just won't cut it. Really easy with DJ, but hackie: jobs create jobs, set run_at to five minutes in future. Optionally, similarly created batch of twelve with hourly cron. Come ask James at Startup Bootcamp :-) If you don't have experience in setting up a server, wtf not? Learn it. It's kinda useful.