linode vs amazon ec2 vs heroku for project with amazon s3 - linux

I have a project in ruby on rails 3.1 like flickr, tumblr, pinterest...etc with a lot of pictures for maintenance.
My project have database Mongodb.
I'm using amazon s3 for host pictures.
I want to know what is the best hosting combination to get the most quality/price, linode + s3, or amazon ec2 + s3 or heroku + amazon s3.
I need enough scale because the project is growing fast.
Any other suggest is welcome :D.
After much reading I am not clear.

If you want to save the most money then I'd go with linode (Amazon ec2 might cost about the same though). With linode for $19.95/month you get 20gb of space where you can host your website and database. If you're using s3 then you can use most of the 20gb for your database. Not only that but on linode the addons that would cost you money on Heroku will be free (solr/sphinx, background jobs, email, etc). Compare this to Heroku where a 20gb shared database alone costs $15/month. Then you need to pay monthly if you want solr, background jobs, etc.
On linode it's free because you run and maintain your own virtual private server (VPS). Which brings me to one of the most important things to consider here, linode will save you money but it will cost you more time since you have to manage everything yourself.
For what it's worth, I am currently in the process of moving much of my hosting over from Heroku to Linode because of the costs involved and because as a rails developer I feel it's important to understand how to manage my own webserver.
There are a lot of other advantages to having your own VPS though. For example, hosting multiple website, creating multiple databases used by other web apps, your own email server, etc.
Update: April 2014
An even cheaper alternative to linode is digitalocean. Their cheapest plan is currently $5/month.

Just for a performance point of view, you'll get better performance if you use EC2 or Heroku since both are parts of the Amazon infrastructure (Heroku runs on EC2).
But it will only benefits if your pictures are processed by your Python server. If your pictures are served directly to the client, it will not have any impact to use Linode :)

Related

AWS multiple services inside one EC2 instance for great speed?

Since I used separate hosting for the database and node.js server, the speed would not be good. If everything is on one machine, the local data exchange will be faster. How can I run AWS services on one instance (node.js, redis, mongodb). In production It is not recommended to run the database together with the server. Is it possible to fine-tune AWS to ensure the same speed between the databases and the server as on a single computer?
Please Help me do not spare your advice!

Deploy React, Node/Express, and MySQL web application onto the web with Amazon AWS

I have lately been learning React and Node js and have been having a lot of fun. I am wanting to deploy / publish my work onto the internet using Amazon AWS (to share my app with friends and potential employers). However, I am having trouble.
I have researched this process quite a bit and can't seem to find any resources that are detailed enough and that touch each aspect of my web app. To clarify, my front end is written in React and my back end is in Node/Express js, and that is connected to a MySQL database. Currently all of this is stored locally on my computer.
I'm not sure how to proceed...I've played around with adding all my code to github and running through the deploy feature on AWS Amplify, but that seemed limited to the react front end (at least I could not discover anything about including the functionality of my back end and including my database connection AND queries from Node).
Can anyone point me in the right direction? Providing any tips, suggestions, and/or resources to aid in this process would be appreciated. Specifically to this question: How to I deploy my React, Node/Express, and MySQL web app (currently stored completely on my local computer) to the internet through Amazon AWS?
To generify the question a little: you want to deploy a frontend, a backend and a database to AWS.
(Un)fortunately, there are lots of different options for this. Let's explore a little.
Frontend
Assuming that your frontend is a set of static resources (html/js/css), you don't need much more than a web server. You can use either S3 (an object store that can also serve web sites), or Cloudfront (a content delivery network), or run a virtual machine on EC2, install a web server there and deploy your frontend there.
Backend
Lots of options here. You can package your app in a Docker container and use ECS (container service or EKS (kubernetes service). You could also run your backend on Elastic beanstalk (comparable to Heroku). Or, run a virtual machine on EC2 and deploy your backend there.
Database
You can choose between a managed/hosted database like RDS, or roll your own by installing it on a virtual machine and installing a database server there.
So, what to pick? It depends on what you're comfortable with. If you have a bit experience with managing Linux servers, you could start an EC2 instance, install a web server like nginx or apache, install NodeJS, install MySQL and then copy your frontend, backend and database scripts/backup to the server.
If you're not comfortable with managing Linux servers, you could go for hosted/managed solutions like S3, Elastic beanstalk and RDS.
Do that, that when your frontend is running on a different domain/url than your backend, your backend needs to set CORS headers otherwise the browser won't allow your frontend to make HTTP requests to your backend.
Hope this helps - good luck!
Elastic Beanstalk (EB) could be a good start, as it can provision all resources that are needed for node.js applications, without much knowledge required about setting up and managing everything from scratch:
Deploying Node.js applications to Elastic Beanstalk.
For simplicity you can start with single instance environment type (no load balancer) and see how it goes.
EB can also setup a database for you:
Adding a database to your Elastic Beanstalk environment
If you get more comfortable about working with AWS, you can scale up into load balanced EB environment, or look at other options, such as your own EC2 instances with autoscaling groups, load balancers, container services and more.

IIS (Win2012) on EC2 with auto scaling

We are looking at moving around 100 websites that we have on a dedicated web server, from our current hosting company; and host these sites on a EC2 Windows 2012 server.
I've looked at the type of EC2 instances available. Am I better going for a m1.small (or t1.micro with auto scaling). With regards auto scaling, how does it work, if I upload a file to the master instance, when are the other instances updated ? Is it when the instances are auto scaled again ?
Also, I will be needing to host a mail enable (mail server) application. Any thoughts on best practice for this ? Am I better off hosting 1 server for everything, or splitting it across instances...?
When you are working with EC2, you need to start thinking about how your applications are designed and deployed differently.
Autoscaling works best when your instances follow shared nothing architecture. The instances themselves should never store persistent data. They should also be able to be automatically set up at launch.
Some applications are not designed to work in this environment. They require local file storage, or other issues.
You probably wont be using micro instances. They are mostly designed for very specific low utilization workloads.
You can run a mail server on ec2, but you will have to use an Elastic IP and whitelist the instances sending mail. By default, EC2 instances are on the spamhaus block list.

EC2 t1.micro - can I run one mongodb with a node server normally?

I intend to use ec2 of amazon web services for building a personal site written by angularJS on nodejs server with NoSQL mongodb(just information and blog) and few tests, study deployment on linux server.
So that someone please give me some suggestions about aws services (include plans, instance run-type ( on-demand, reserves or spot), storage, IOs, bandwidth if it has).
The low cost is need but must not be lowest, I just want it runs normally without any server side's issue.
Thanks all.
Yes it will be fine if you don't have much load/users. I was running apache + tomcat + mongo on a micro instance (~ 600Mb RAM) and it was ok. It is free for 1 year from the time you register. You can easily change instance type without reinstall later if you feel its running out of resources. You can find pricing details and calculator on AWS site, but micro instance is around $10 per month, and small is about $24 or a bit more.
Yes you can , currently i am using the micro instance of apache + mongo and it works fine . The only issue i saw when i was using the micro instance of the windows server + mongo . It was too slow because of the this reason i moved to Ubuntu and mongoDB + php which is working cool

How to run node.js on normal linux hosting

I recently saw a good blogging platform named ghost.
But it is based on node.js so a usual Linux hosting can't handle it.
So is it possible to run node.js on a Cpanel (Linux host) or convert node.js projects to normal php?
DigitalOcean is currently the cheapest and (in my opinion) the easiest way to start a Ghost blog. They offer one-click Ghost installations on their SSD VPSes, which run on Ubuntu. Hmm, DigitalOcean is quite new, they began back in 2011, but are setting new standards - for $5 /month, you can get a VPS with 20Gb SSD, 1TB bandwidth and other cool features...
But beware, they're so cheap because they don't offer 24/7 support, like Mediatemple or other enterprise hosting solutions, but they do have an amazing community-driven forum/blog, where you can find nice tutorials, ranging from how to set up a VPS to hosting OpenVPN.
Usually normal shared hosts do not provide node.js hosting. You can try aws ec2 and install node.js in it or try heroku or other node.js hosting providers.
Regular shared hosts don't support nodejs but you can try a private server like aws or specific nodejs hosting like www.nodejitsu.com
Yalamber answered the question as I would have.
I'm not sure if this applied when Nick wrote his answer, but IMO the cheapest and easiest way to set up a Ghost blog is via Ghost's Hosted Platform: https://ghost.org/subscribe/trial/

Resources