Amazon S3 & EC2 for hosting? - amazon-s3

I have a little dot com site, personal portfolio, running HTML w/ CSS right now. I'm thinking of eventually running something like node.js w/ a custom CMS. But I'm paying over $110 a year for hosting when I use about .5 gigs of bandwidth a month & just a few domains I don't need.
Will EC2 with my own Server be cheaper on a micro instance? Not to mention nerdy :-)

It's cheaper but, only by a little (except while your in the 1st year of trial service where some things are totally free). After the first year its $85 for a 3-yr micro instance (or $54 for 1/yr) with the following:
613 MB memory
Up to 2 EC2 Compute Units (for short periodic bursts)
EBS storage only
32-bit or 64-bit platform
I/O Performance: Low
API name: t1.micro

It is indeed cheaper, and if you go small enough it's free for the first year (if you only have one instance).
Getting node.js to run on ec2 is a bit interesting but it can be done (I've done it). Good luck.

Well - micro instance is 2 cents per hour which gives 365*24*0.02 = 173$. Stay with your current hosting if you don't have problem with reliability there.

You can also check price for other cloud providers with cloudorado.com.

Related

Why is Azure SQL database so expensive?

For a small personal coding project I recently created a SQL database in Azure. For the past weeks I have been hardly using the database, out of 2 GB available space I have been using only 13 MB.
However, the database costs me 6,70 EUR per day and I don't understand why this is the case. Read a few topics/posts stating that the costs with similar use should be around 5-7 EUR per month, not per day.
This is the configuration for the database:
No elastic pool
General purpose, Gen5, 2 vCores
West Europe
Does anyone have an idea about what could be causing the costs per month to be so high?
You choosed the General purpose, Gen5, 2 vCores price tier. Here is the cost every month:
This means that you must pay for it no matter how many space you used. As you said you just used only 13M. So you must change the Pricing tier.
What I suggest you is configure you database price to Bacic which only cost you 4.99 USD per month. Basic price tier provides 5 DTUs and Max size 2GB for you.
You can change the price tier on the database overview site:
Hope this helps.
You're paying for the entire infrastructure is why. It really only saves on upfront cost. A dedicated server, Windows Server + SQL Server Web will run you, at least $5K. Performance wise, a dedicated server at a colo center will be a lot cheaper to run once you get the hardware. I know, I've switched several companies off of Azure and, instead of paying $2500/mo, they pay $200/mo (after the server) for 4U at a colo + $100/mo basic maintenance and 1TB/mo bandwidth, so it adds up. For example, I built 2 custom 1U servers (12 core/32GB) for $8500 and an opensource router for another $500 (pfSense), including OSes & SQL Server Web. Initial setup of both servers including SQL and the router for 16 IP Addresses was about $1K. Total cost was $10K up front. The equivalent horsepower and storage from Azure was $2500/mo. In 1 year on Azure it ran $30K! 1 year on colo (hosting + maintenance) was $13600, the following year was $3600. So far in 5 years, they saved ~$122,000. There was only 15mins of downtime during the entire period. Cloud hosting is a great idea, but it will never save you time nor money at the rates these company's charge. As far as downtime, I have been hosting for 2 decades and the worst downtime happened due to a network failure (that also took out multiple cloud providers) and it was 13 hours. The only other one was due to a fried router (about 3 hours). Just my take on it - Cloud hosting is still way too expensive for what you actually get & redundancy is nice but you can buy a new server every 2 months for the price difference (just get good equipment w/redundant power supplies and hot swap drives - in a 55 degree colo center, failures are rare)
It seems you don't know Azure offers a free tier. Please refer to this StackOverflow thread for details on how to take advantage of the free tier that supports databases of 32 MB of space.
If it is a small project you can run it on Ubuntu Linux and it's $3.80/month or $0.0052/hour.
On top of this, you can install MySql or SQL Express. I personally find MySql easier to access/configure
It's sure that Azure offers a free tier but still you can optimize it with very low cost if you use any purchased plan.
Here I provided some direction on the picture below that how to create free App Service Plan
Now let's see how we can optimize the cost for small database size for your purchased plan.
Go to the option of Create SQL Database
Click on the link Configure Database as per the below picture
Then Select the Basic option under DTU-Based as per the below picture
As the above picture shows, the default selected option is General Purpose option under VCore-Based section, so it costs $410 as it provides you 32 GB database.
As Basic option is selected, so DB Size is changed into 2 GB instead of 32 GB, hence cost is changed into just $5.64 instead of $410

What AWS Configuration Should We Use In Production?

I have been researching AWS. It seems a little confusing to me. We want a single box for production purposes before we go live. It will have MySQL, SVN, Java, and a few other custom attributes.
1) What features of AWS should I sign up for if we are only developing - not live. Can you suggest a configuration? We are looking to keep our costs as low as possible right now.
2) Is it possible to get an instance with pre-bundled stuff like SVN and MySQL? Where do i Look?
3) What instance type should I be selecting if we are only developing? Here are my choices:
http://aws.amazon.com/ec2/instance-types/
4) Which would be more cost-effective for us - reserved or on-demand? I suppose on-demand would be cheap because we have no traffic other than dev stuff but I like that the reserved instances will let me know what I will be spending ahead of time. Anybody have any experience here?
Thanks.
1) You probably want to start with EC2. After that you can have a look at for example S3.
2) Yes, in the AWS Management Console for EC2 search for ready-built AMIs (Amazon Machine Image) that contain what you need pre-configured.
3) You can start with Micro instances which are the cheapest. Note though that they are 32-bit only. When you feel Micro instances are too limiting (need more memory or CPU power), just switch up to the Small instance type.
4) The only way to know if Reserved instances are cheaper than On-Demand for your use case is to estimate the number of hours of each instance type you expect to consume during the next 1 or 3 years, and compare the cost in dollars of the two options. If your development instances are left running over night (i.e., they are running around the clock), then most certainly Reserved instances will be cheaper if you are sure you will keep using AWS for at least 1 or 3 years.
I want to add a few things to #Seppo's answer.
I would not start with a reserved
instance. What if you reserve an
instance and then it turns out to be
not suitable. Test it first (even if
its only for a few hours) on the
normal pay as you go tariff. You can
easily change the existing instance
to a reserved instance later. Just
by purchasing a reserved instance,
you will change your billing rate on
the existing instance.
You do not have to run a reserved instance for the full year (or 3) to save money. You are not paying for the entire period up front - only a deposit - so you only need to run it for a few months (depending on the instance type) to break even.

Amazon Web Services Apache Server

I am trying to get a feel for the costs imposed by running apache on AWS continually. Assuming that the service is scarcely used, does anyone know how many cpu hours that would eat up in a month just by sitting there and running? I understand that this is slightly impractical but I am trying to figure out what the cost of entry is to deploy an application on this platform (as compared to GAE). I suspect it to be small but I would like to know.
Amazon charges for EC2 instances by uptime, not CPU time. The cheapest Linux instance type costs 8.5c / hour, or about $37 / month. You can reduce this by either signing up for a reserved instance that you plan to run for an extended period, or by using a spot priced instance where you bid the price you're prepared to pay.
You will also incur bandwidth charges for data transfer in and out of the EC2 network, and storage charges if you store any data permanently on AWS. These should be small compared with the cost of running the instance.
You can always have an estimates here:
http://calculator.s3.amazonaws.com/calc5.html

Deploying on EC2

This question is for anyone who has actually used Amazon EC2. I'm looking into what it would take to deploy a server there.
It looks like I can start in VirtualBox, setup my server and then export the image using the provided ec2-tools.
What gets tricky is if I actually want to make configuration changes to my running server, they will not be persistent.
I have some PHP code that I need to be able to deploy (and redeploy) to the system, so I was thinking that EBS would be a good choice there.
I have a massive amount of data that I need stored, but it just so happens that latency is not an issue, so I was thinking something like s3fs might work.
So my question is... What would you do? What does your configuration look like? What have been particular challenges that perhaps you didn't see coming?
We have deployed a large-scale commercial app in the AWS environment.
There are three basic approaches to keeping your changes under control once the server is running, all of which we use in different situations:
Keep the changes in source control. Have a script that is part of your original image that can pull down the latest and greatest. You can pull down PHP code, Apache settings, whatever you need. If you need to restart your instance from your AMI (Amazon Machine Image), just run your script to get the latest code and configuration, and you're good to go.
Use EBS (Elastic Block Storage). EBS is like a big external hard drive that you can attach to your instance. Even if your instance goes away, EBS survives. If you later need two (or more) identical instances, you can give each one of them access to what you save in EBS. See https://stackoverflow.com/a/3630707/141172
Burn a new AMI after each change. There's a tool to create a new AMI from a running instance. If EBS is like having an external hard drive, creating a new AMI is like having a DVD-R. You can save the current state of your machine to it. Next time you have to start a new instance, base it on that new AMI. Good to go.
I recommend storing your PHP code in a repository such as SVN, and writing a script that checks the latest code out of the repository and redeploys it when you want to upgrade. You could also have this script run on instance startup so that you get the latest code whenever you spin up a new instance; saves on having to create a new AMI every time.
The main challenge that I didn't see coming with EC2 is instance startup time - especially with Windows. Linux instances take 5 to 10 minutes to launch, but I've seen Windows instances take up to 40 minutes; this can be an issue if you want to do dynamic load balancing and start up new instances when your load increases.
I'd suggest the best bet is to simply 'try it'. The charges to run a small instance are not high and data transfer rates are very low - I have moved quite a few GB and my data fees are still less than a dollar(!) in my first month. You will likely end up paying mostly for system time rather than data I suspect.
I haven't deployed yet but have run up an instance, migrated it from Ubuntu 8.04 to 8.10, tried different port security settings, seen what sort of access attempts unknown people have tried (mostly looking for phpadmin), run some testing against it and generally experimented with the config and restart of the components I'm deploying. It has been a good prelude to my end deployment. I won't be starting with a big DB so will be initially sticking with the standard EC2 instance space.
The only negativity I have heard it that some spammers have made some of the IP ranges subject to spam-blocking - but have not yet confirmed that.
Your virtual box approach I will suggest you take after you are more familiar with the EC2 infrastructure. I suggest that you go to EC2, open an account and follow Amazon's EC2 getting-started guide. This guide will give you enough overview on all things (EBS, IP, CONNECTIONS, and otherS) to get you started. We are currently using EC2 for production and the way we started was like I am explaining here.
I hope you become a Cloud Expert Soon.
Per timbo's concern, I was able to nab an IP that, so far hasn't legitimately shown up on any spam lists. You will have a few hiccups since many blacklists are technically whitelists and will have every IP on their list until otherwise notified that a Mail Server is running on that IP. It's really easy to remove, most of them have automated removal request forms and every one that doesn't has been very cooperative in removing me from their lists. Just be professional, ask if they can give a time and reason for the block and what steps you should take to remove your IP. All the services I have emailed never asked me to jump through any hoops, within two or three business days they all informed me my IP had been removed.
Still, if you plan on running a mail server I would recommend reserving IPs now. They're 1 cent per every hour they are not bound to an instance so it works out to being about $7 a month. I went ahead and reserved an extra one as I plan on starting up another instance soon.
I have deployed some simple stuff to EC2 Win2k3 instances. Here's my advice:
Find a tutorial. Sign up for the service. Just spend an afternoon setting up your first server. It's pretty darned easy, though there will be obstacles to overcome. It's not too tough.
When I was fooling with EC2 I think I spent like $2.00 setting up a server and playing with it for a while.
Some of your data will be persistent, but you can connect S3 to EC2 as well.
Just go for it!
With regards to the concerns about blacklisting of mail servers, you can also use Amazon's Simple Email Service (SES), which obviates the need to run the mail server on the EC2 instances.
I had trouble with this as well, but posted a note here in their forums - https://forums.aws.amazon.com/thread.jspa?threadID=80158&tstart=0

How many users does a shared hosting website scale for?

I'm planning on hosting 3 or 4 WCF/.NET 3.5 REST webservices to be used by a new iPhone application.
I've heard good reviews about DiscountASP.NET (http://www.discountasp.net/index.aspx), but I'm pretty ignorant about shared hosting performance. At the same time, I think it's still early to pay $90 a month for a scalable Amazon EC2 server instance.
So, any idea how many hits/month would a shared hosting website handle?
It depends on how good your shared hosting is. To determine simultaneous users, you can try to benchmark the performance of your server by hitting with many requests.
Your host will likely yell at you if they see you using a lot of your cpu. For web services, bandwidth isn't so much an issue as is your cpu/memory availability.
You should be more concerned about simultaneous users instead of hits per month. You want to be able to handle any spikes in traffic. Shared hosting is less predictable because you don't control the usage of the other users on the machine.
I would say if you're starting out, shared hosting would probably be fine, just monitor it and upgrade when you see decreasing response times. Your host will probably let you know when you are affecting the performance of everyone else on the server.
They are all different. It depends on how much bandwidth they are giving you. (GB/Month is a typical metric).
I would say that hits per month could range in the low hundred thousands without causing major issues on many managed hosting. It all depends how intenst your WCF services are. The advantage is that many managed hosting facilities will allow you to dynamically add more hosting power to your site. (For more $ obviously).