Understading cloud computing and scaleout
Can someone clarify about cloud computing a 开发者_如何学Cbit? For example with Amazon Ec2 and others, in their presentations they all say that you add more servers and spread load across servers, bla bla; but how is this done at webmaster's end? For example I have a site with Apache PHP MySQL. By adding more servers, will the added servers directly process the data of existent server or each server needs its own coding and adjustments in order to process parts of traffic, db queries, etc? What I am asking is... will these servers know what their job is? Or is it just like buying new dedicated server that needs instructions?
Thank you.
EC2 supplies boxes. Lots of them. How they coordinate with each other to provide a service is up to you. There are plenty of tools, frameworks and techniques available to you, and which can be used in an EC2 environment, but they are largely out of scope for EC2.
Having said that, EC2 does provide some tools, such as SQS, EBS, SimpleDB, Elastic MapReduce and other that make it easier to leverage clusters of computers semi-transparently in solving certain kinds of problems. Also (if you were developing in Java) Elastic Beanstalk provides an auto-scaling application stack for applications bundled as WAR files.
The main difference between Amazon EC2 et al and dedicated servers is that with cloud computing you get an API which allows you to add more resources (more servers for example) programmatically based on current load of your servers. This API is available for many languages (PHP, Ruby ... etc ...).
This will allow you to cut costs as you will only need to spin server when your application is under load, and then shut them off when you don't need them. This is a major cost cutting option as long as the load on your applications is not consistent and you get "burst" of traffic.
All of the mentioned above should be taken into consideration while you're developing ... nothing is done by magic and this is where the API comes into play. Take a look at Amazon EC2 API reference to get an idea about what you can do: API link
精彩评论