Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can someone elaborate on these basic concepts of hosting via Amazon Web Services?

I read all over the Amazon documentations, but I'm still confused or should I say overwhelmed by the different terms.

I'm coming from a traditional web hosting environment where the only concept I understand is how much storage I have and how much bandwidth I'm allowed.

Here are what I understand so far about amazon and my questions about a lot of it.

EC2 - I assume are instances where I can set up my webserver (IIS) and run my .NET application? Or is it already setup for me?

EBS - For database? If not, where do I get the database server? Is the database server (Sql server 2005 or 2008) already installed? What is Snapshot Get Requests? and Snapshot Put Request?

S3 - What is this used for? I thought EBS is for storage, confused here. Why you need S3?

Elastic Load Balancing - I thought load balancing is just a way to alleviate the burdens on your web servers. how does it work with Amazon? What do they mean by "elastic" load balancing?

Data Transfer between region - What does that mean? and how do you control which region the data transfers to and from?

My requirements are the following

  1. I need an IIS webserver to run my page
  2. I need a database server
  3. I need a location to store my files (can it be on the same "server" as #1)?
  4. I need the database and file servers to always be recoverable. (I heard we need to store it into EBS to avoid loss of data?)
  5. In case one web server is overloaded, performs slow, I need it to switch off to another server in the farm.
  6. If traffic spikes, then I need a way to increase CPU, memory, etc. The ability to handle traffic nicely (which is the purpose of elastic I'm assuming)

In addition, I don't really understand the concept of "if you are not running your instance, shut it down or else it will be charged". I will run a website which ideally is to keep it up 24/7. In what scenarios do you conditionally have the instances up or down?

[Edit]

And how do you exactly monitor your usage? So you don't get surprised with a couple thousands of dollars? can you put a cap on it? I read stories where AWS users got surprised by a $300 bill or whatever when they didn't have much hosted on Amazon nor have any traffic intensive sites.

Sorry, I'm a complete newbie to "cloud" computing. Trying to catch up here.

Thanks a lot in advance

like image 297
Liming Avatar asked Mar 04 '11 17:03

Liming


2 Answers

You're asking a lot of questions, but let me try to provide a high-level overview:

  • EC2: Just a server in the sky. When you're booting up a server, you're using the EC2 technology.
  • EBS: Consider this to be a hard-disk. Your server image must be booted off a disk, and this is it.
  • S3: A place to store your files, and then retrieve them using HTTP. For performance and scalability reasons you may want to place data and images on S3 rather than running it directly off your server.
  • Elastic Load Balancing: A load balancer sits in front of all requests and directs them transparently to a live server. You would use this if your app consists of many servers (say 5 or more) and you want the load balancer to spread the load and automatically bypass any failed machines.
  • Data transfer between regions: Amazon datacentres are spread all over the world. If you need to transfer data between physical region then they will charge you per kb of data transacted.
  • Databases: If you're building an app then just start with your own database running on your own server. ie. Just kick off your app using MS SQL or MySQL and then look more in depth at Amazon owned database solutions.
  • Charges: You are correct that Amazon charges can get out of hand and expensive, but that is very much dependent as to how well you control your own infrastructure. Cloud means direct charges per unit of bandwidth and CPU consumed. You can immediately see a lowering of charges if you cache images client-side (bandwidth) and reduce the size of your machine (CPU). You may want to look at http://LabSlice.com [disclaimer: See my sig, as it's where I work] as the technology there can help keep EC2 costs low. My #1 recommendation is to keep an eye on the 'Account' panel on the Amazon console, as that gives a running tab of your charges, and that way you avoid surprises.
like image 177
Simon at LabSlice-com Avatar answered Oct 15 '22 00:10

Simon at LabSlice-com


I can perhaps answer some of your questions, but certainly not all. EC2 are virtual machines preconfigured with a number of different options. It sounds like what you want is a Windows instance. They come with a number of different memory and cpu options depending on what you think your application will need.

EBS is basically your fault tolerant file-system. That is where you'll put your files, including your database files.

S3 is in essence a content delivery network. A REST friendly place to put files. For example if all you have is static content you could put the whole thing up in an S3 bucket, and not pay for any compute power, just storage, and bandwidth (which is cheap).

I should add, there is no need to use S3, if you are comfortable with using your EC2 instance to serve up all your content. Its all a question of options.

As to why would you shut off an instance -- that would be because you're not using it. For example, a staging server, that you would use to test your app, in a variety of different scenarios. You could have a different EC2 instance per scenario, start them when you want to run your tests and stop then when you're done.

As for SQL Server, one of the EC2 instances that Amazon offers "pre-configured" includes a SQL Express already set up. If you don't want SQL Express, then I beleive you'll have use one of your SQL Server Licences and install it on your server.

The great thing about AWS is the very low barrier to entry. For just a few dollars investment, you can poke around for a day and see what there is to see. When I first started with AWS I found it helpful to start small, with a single EC2 instance. Just open up the RDP ports and connect into it. You'll soon feel right at home, having a your own machine up in the cloud.

Let the CDN and load balancing things come in time.

On last bit of advice, is to remember that your ESB data and your instance must be in the same region. If you start a machine in Europe, and your ESB volume is in Seattle you're out of luck. You'll have to move your volume from one region to another (and they charge something for that data transfer)

like image 44
Ralph Shillington Avatar answered Oct 14 '22 23:10

Ralph Shillington