EC2和Beanstalk有什么区别?我想了解SaaS, PaaS和IaaS。

要在Wordpress中部署一个web应用程序,我需要一个可伸缩的托管服务。如果有比我的目的更好的事情,也请让我知道。

供您参考-我想托管和部署多个Wordpress和Drupal站点。

我不想把更多的时间花在服务器上,专注于开发。但是云托管需要自动伸缩。


当前回答

EC2

This service allows you to provision cloud instances. You can connect to the instance to run your workloads and is generally ideal for development work. Eg. You want to run a high end simulation which requires a powerful Gpu.

Elastic Beanstalk

This is a whole environment, meaning you can have multiple instances. It is ideal for hosting web applications. Beanstalk comes with autoscalers which can automatically scale according to the demand. Basically it gives all the advantages of cloud like scalability, security and reliability to your app.
The primary difference between the two services is that Beanstalk will manage the instance for you. Eg. If you provision a g34x large, and you need a bigger instance cause your workload suddenly increased, beanstalk will scale accordingly. But with EC2 you have to manually modify the configuration. Similarly it can also scale down if there is less network traffic. These settings are configurable.

其他回答

首先,EC2和弹性计算云是一回事。

接下来,AWS包含了包括EC2和Elastic Beanstalk在内的一系列Web服务。它还包括许多其他的,如S3、RDS、DynamoDB和所有其他的。

EC2

EC2是Amazon的服务,允许您在AWS云中创建服务器(AWS调用这些实例)。你按小时收费,只付你用的钱。您可以对这个实例做任何想做的事情,也可以启动n个实例。

Elastic Beanstalk

Elastic Beanstalk is one layer of abstraction away from the EC2 layer. Elastic Beanstalk will setup an "environment" for you that can contain a number of EC2 instances, an optional database, as well as a few other AWS components such as a Elastic Load Balancer, Auto-Scaling Group, Security Group. Then Elastic Beanstalk will manage these items for you whenever you want to update your software running in AWS. Elastic Beanstalk doesn't add any cost on top of these resources that it creates for you. If you have 10 hours of EC2 usage, then all you pay is 10 compute hours.

运行Wordpress

对于运行Wordpress,它是你最舒服的。您可以直接在单个EC2实例上运行它,也可以使用AWS市场的解决方案,或者使用Elastic Beanstalk。

选什么?

如果你想减少系统操作,只关注网站,那么Elastic Beanstalk将是最好的选择。Elastic Beanstalk支持PHP堆栈(以及其他堆栈)。您可以将站点置于版本控制中,并在进行更改时轻松部署到您的环境中。它还将设置一个自动伸缩组,如果流量增长,可以产生更多的EC2实例。

下面是谷歌搜索“elasticbeanstalk wordpress”的第一个结果:https://www.otreva.com/blog/deploying-wordpress-amazon-web-services-aws-ec2-rds-via-elasticbeanstalk/

EC2是一个IaaS计算服务;这意味着计算资源通常由提供它们的云工程师管理

而Elastic Beanstalk是PaaS,在这里您不需要过多地限制资源管理。您只需指定需要的内容,aws就会自动处理任务。例如,提供一个LAMP堆栈

EC2

This service allows you to provision cloud instances. You can connect to the instance to run your workloads and is generally ideal for development work. Eg. You want to run a high end simulation which requires a powerful Gpu.

Elastic Beanstalk

This is a whole environment, meaning you can have multiple instances. It is ideal for hosting web applications. Beanstalk comes with autoscalers which can automatically scale according to the demand. Basically it gives all the advantages of cloud like scalability, security and reliability to your app.
The primary difference between the two services is that Beanstalk will manage the instance for you. Eg. If you provision a g34x large, and you need a bigger instance cause your workload suddenly increased, beanstalk will scale accordingly. But with EC2 you have to manually modify the configuration. Similarly it can also scale down if there is less network traffic. These settings are configurable.