手动部署与Amazon Elastic Beanstalk [英] Manual deployment vs. Amazon Elastic Beanstalk

查看:80
本文介绍了手动部署与Amazon Elastic Beanstalk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过使用Elastic Beanstalk相对于手动创建EC2实例,设置tomcat服务器并为典型的Java Web应用程序进行部署等,我们有什么优势.负载平衡,监视和自动缩放是唯一的优势吗?

What are the advantages we get by using Elastic Beanstalk over maually creating EC2 instance and setting up tomcat server and deploy etc for a typical java web applicaion. Are load balancing, Monitoring and autoscaling the only advantages?

假设使用数据库的Web应用程序将数据库安装在EC2实例本身中.自动缩放发生时,数据库将在新创建的实例中创建,还是将访问我在主实例中创建的数据库...如果自动缩放发生时仅创建副本,实例之间将如何进行数据同步?/p>

Suppose for my web application which uses database I installed the database in the EC2 instance itself. When Autoscalling takes place will the database gets created in the newly created instance or it will be accessing the database I created in the master instance... If it creates just a replica when autoscaling happens how will be data sync happens between the instances?

推荐答案

您提到的所有内容(如负载平衡,监视和自动缩放)绝对是优势.

All the things you mentioned like load balancing, monitoring and auto-scaling are definitely advantages.

但是,您必须这样考虑:在真正的平台即服务(PAAS)中,目标是将应用程序与平台分离.作为开发人员,您只需要担心您的应用程序.该平台已出租"给您.平台实例"将自动为您更新,管理,缩放,平衡等.您只需上传WAR文件,它就可以正常工作(至少在理论上是这样).

However, you have to kind of think about it this way: In a true Platform as a Service (PAAS), the goal is to separate the application from the platform. As a developer, you only worry about your application. The platform is "rented" to you. The platform "instances" are automatically updated, administered, scaled, balanced, etc. for you. You just upload your WAR file and it just works (at least theoretically).

EC2本身不是PAAS.它更像是IAAS(基础架构即服务).您仍然需要照顾服务器实例,在它们上安装软件,保持它们更新等.

EC2 by itself is not PAAS. It is more like IAAS (Infrastructure as a Service). You still have to take care of the server instances, install software on them, keep them updated, etc.

Elastic Beanstalk是一个PAAS系统. App Engine Azure也是如此.

Elastic Beanstalk is a PAAS system. So are App Engine and Azure among many others.

在真正的PAAS系统中,DBMS是与Web应用程序服务器不同的组件.原因很明显:无法将DBMS安装在用于应用程序服务器的实例上,因为根据您的流量创建和销毁实例时,DBMS将会丢失!无论如何,将DBMS和应用程序服务器放在同一台机器/实例上通常不是一个好主意.

In a true PAAS system, the DBMS is a separate component from the web application server(s). The reason is obvious: The DBMS cannot be possibly installed on the instances that are being used for the application server because, as instances are created and destroyed based on your traffic, the DBMS would be lost! Having the DBMS and application server on the same machine/instance is not generally a good idea anyway.

在PAAS系统中,DBMS是一项单独的服务.对于Amazon,则为 Amazon RDS .就像使用Elastic Beanstalk一样,您不必担心应用程序服务器,而只需使用RDS上传WAR文件,就不必担心DBMS,而只需部署数据库.

In a PAAS system, the DBMS is a separate service. For Amazon, it would be Amazon RDS. Just like with Elastic Beanstalk, where you don't have to worry about the application server and you just upload your WAR file, with RDS, you don't have to worry about the DBMS and you just deploy your database(s).

Elastic Beanstalk和RDS可以很好地协同工作,尤其是当部署在相同的可用性区域中时,该区域的延迟将非常低.

Elastic Beanstalk and RDS work very well together, especially when deployed in the same availability zone, where the latency would be very low.

最后,使用Elastic Beanstalk不会比部署的资源(EC2实例和负载平衡器)花费更多.但是,RDS并不便宜,而且肯定比在应用程序服务器和DBMS中使用单个EC2实例贵.

Finally, using Elastic Beanstalk doesn't cost anything more than the deployed resources (EC2 instances and the load balancer). However, RDS is not cheap and would definitely be more expensive than using a single EC2 instance for both the application server and the DBMS.

这篇关于手动部署与Amazon Elastic Beanstalk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆