Friday, October 7, 2011

Cloud ... clearing the cloudy concept.

Was interacting on a message thread with a friend on a networking portal on Cloud Computing. Since it went deep want to share it over here...

The  question ...
"In virtualization single pc act as multiple And in cloud many act as single
Actually there are so many articles on web and I m confused which one is right, true?"


The Answer...

Virtualization is static ... Cloud is dynamic.
Eg.
I have a site. I need that site to support 10 million users and the best server I am getting from my provider can support 2 million ... so I have to buy 5 such servers from him. Now even if my site is being used by 1 million users I still end up paying up for 5 servers, where as in cloud you pay as you consume ... Now if my provider has a cloud setup of 20 servers (each supporting 2 million (same as above but wrapped by a cloud layer) ) the cloud will dynamically add on more server machine if the users exceed 2 million and remove it when the hit count gets low. So I'll end up paying for server only when I use it.

The next question ...

"I am clear 95% ...But the addition and removal of servers will happen automatically ?
mean am I need to inform my cloud provider first time about my peak value..
Or it will happen in this way that I took one instance and host my site And forgot about visitors The extra server will add automatically when hit count goes up and when hit count goes down the extra server is removed automatically ? As in the above example should I need to buy one instance or 5 instances ?"

The Answer...
Yes its automatic ... The service providers will boast of their cloud network ... its you who need to make a choice. Providers like Amazon EC2, Microsoft Windows Azure, Google Cloud SQL (just for database hosting) will advertise the strength of their cloud (how much data they can handle, what is the computation speed and other benchmarks), so you need to pick one that suit your need. They will not increase or decrease the strength of their cloud on your need (they will always look to add more to their cloud). Its you who has to decide that the services that they list will be sufficient for you?
You just nee to pick the right service provider which has the adequate network (of servers, balances etc ) to support your need, rest is automatically handled.
If you want something private (mean creating your own cloud) you need to have an OS that support it like CloudLinux(already released) or Windows Cloud(about to release in a month) and you can make it as fat as you want.
Hope this help for the rest 5%

 The next question ...
"Okay Bro 99% :) last question :)
lets take your first example I have a java application and my peak load value is 2 million also video chat of three people is there with fms,red5 or wowza. For that scenario which provider is best. Is amazon with ec2 have support like that or any other provider ?"

The Answer...
Here is the final 1% of text which I'll try to clear the remaining 99% of the doubts ...
Firstly what I get from your ''last question" is ...that you have understood cloud but you are not clear what Amazon EC2 is ...
I'll talk about that first ...
Amazon Cloud provides various types of instances
1. Standard
2. Micro
3. High Memory
4. High CPU
5. Cluster
Each of the above type have defined set (capacity, memory, computation etc). You need to pick the one that suits you (your need)
Amazon provides web services to access its features
1. EC2 (Elastic Cloud) - To manage instances
2. S3 (Storage Service) - To manage data
3. RDS (Relational Database Service) - To manage database
4. SQS (Simple Queue Service) - To manage Message Queues

You can choose from pre-configured AIMs Amazon Machine Images or create your own AIM. Its is this AIM that gets loaded when you create an new instance using your EC2 web-service.
Amazon's pre-configured AIMs have the cost of AIM depends the type of software it contains. If you want to have streaming you can choose and AIM which has wowza media pro (if you want to use FMS you need to bear the licensing cost (and that will be per instance) ).

Once everything is chosen (Instance type with AIM that is required to run your site), you are ready for launch.
Amazon charges you for Instance usage per hour.
So now lets go back to you problem : Suppose you chose High CPU with AIM having wowza and Amazon rate for the same are $0.50 per hour. Now you calculated that the instance you chose would comfortably support half a million users.
You launched your site with one instance up after after an hour the user count crossed half million mark , using EC2 service you start another instance, after two hours it started crossing the million again via your web-service you start another instance. After five hours the hit cam down to half a million again so using you web-service you'll turn off two instances.

Here is how you are charged.
Total hours 7
1st hour - $0.50
2nd hour - $0.50+$0.50
3rd hour - $0.50+$0.50+$0.50
4th hour - $0.50+$0.50+$0.50
5th hour - $0.50+$0.50+$0.50
6th hour - $0.50
7th hour - $0.50
You are charged in instance basis.You may activate 100 instances if you feel the need.

The above example is to make you understand. There are other charges involved too like data transfer charges, region based server charges etc.

Hope this helps... 


Clearing the Cloudy Cloud. -S