当人们开始部署某个东西时,通常会问这个问题:Heroku或AWS。
我使用Heroku和AWS的实验,这里是我的快速回顾和比较:
希罗库
One command to deploy whatever your project types: Ruby on Rails, Nodejs
So many 1-click to integrate plugins & third parties: It is super easy to start with something.
Don't have auto-scaling; that means you need to scale up/down manually
Cost is expensive, especially, when system needs more resources
Free instance available
The free instance goes to sleep if it is inactive.
Data center: US & EU only
CAN dive into/access to machine level by using Heroku run bash (Thanks, MJafar Mash for the advice) but it is kind of limited! You don't have full access!
Don't need to know too much about DevOps
AWS - EC2
This just like a machine with pre-config OS (or not), so you need to install software, library to make your website/service go online.
Plugin & Library need to be integrated manually, or automation script (public script & written by you)
Auto scaling & load balancer are the supported services, just learn how to config & integrate to your system
Cost is quite cheap, depends on which services and number of hours you use it
There are several free hours for T2.micro instances, but usually, you will pay few dollars every month (if still using T2.micro)
Your free instance won't go to sleep, available 24/7 (because you may pay for it :) )
Data center: around the world. Pick the region which is the best fit for you.
Dive into machine level. So you can enjoy it
Some knowledge about DevOps, but it is okay, Stackoverflow is helpful there!
AWS Elastic Beanstalk是Heroku的替代品,但更便宜
《Elastic Beanstalk》是在2010年发布的公测版本;它帮助我们更容易地进行部署。详情请点击这里
Beanstalk是免费的,您将支付的费用将用于您使用的服务和使用小时数。
我用了很长一段时间的弹性豆茎,我觉得它可以代替Heroku,而且更便宜!
总结
Heroku:开始很简单,免费实例,但之后很贵
AWS:不容易,免费小时可用,有点便宜,豆茎应该关注使用
所以在我目前的系统中,我使用Heroku进行分期,使用Beanstalk进行生产!