是云做好准备的企业Java Web应用程序?寻找一个Java EE托管咨询 [英] Is the Cloud ready for an Enterprise Java web application? Seeking a Java EE hosting advice

查看:172
本文介绍了是云做好准备的企业Java Web应用程序?寻找一个Java EE托管咨询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里问候所有的聪明人!

Greetings to all the smart people around here!

我想问是否可行还是一个好主意,在所有部署Java企业Web应用程序到云,如亚马逊的EC2。更确切地说,我在寻找基础设施选择一个应用程序,办理几百个用户提供长,但既不是CPU还是内存密集型的会话。我正在考虑专用服务器,虚拟专用服务器(的VPS)和EC2。我注意到,有一个名为JBoss的云计算项目,所以人们正在使这种部署,在另一方面,它似乎并不成熟但,我不知道云是准备好这样的应用程序,它不同于典型的基于云计算的应用,如微博。你会推荐将其部署到云计算?有哪些优点和缺点?

I'd like to ask whether it is feasible or a good idea at all to deploy a Java enterprise web application to a Cloud such as Amazon EC2. More exactly, I'm looking for infrastructure options for an application that shall handle few hundred users with long but neither CPU nor memory intensive sessions. I'm considering dedicated servers, virtual private servers (VPSs) and EC2. I've noticed that there is a project called JBoss Cloud so people are working on enabling such a deployment, on the other hand it doesn't seem to be mature yet and I'm not sure that the cloud is ready for this kind of applications, which differs from the typical cloud-based applications like Twitter. Would you recommend to deploy it to the cloud? What are the pros and cons?

该应用程序是Java EE 5的Web应用程序,其主要功能是让用户通过组合现有的部件组成他们自己的定制产品。它采用无状态和有状态会话Bean和JPA为实体的持久性关系数据库,获取有关通过Web服务从公司的库存系统部件的信息。除了外部的用户来说,也使用了一些内部的人,谁是针对公司的LDAP身份验证。该应用程序应该处理在300-400家左右的并发用户构建自己的产品,应该是合理的可扩展性和可尽管这些素质是只有在这个阶段中的重要性。

The application is a Java EE 5 web application whose main function is to enable users to compose their own customized Product by combining the available Parts. It uses stateless and stateful session beans and JPA for persistence of entities to a RDBMS and fetches information about Parts from the company's inventory system via a web service. Aside of external users it's used also by few internal ones, who are authenticated against the company's LDAP. The application should handle around 300-400 concurrent users building their product and should be reasonably scalable and available though these qualities are only of a medium importance at this stage.

我已经提出了包括防火墙(FW)和负载均衡器支持粘性会话和HTTPS(在云中,这将被替换上的应用程序EC2的弹性负载平衡服务和FW的体系结构。服务器,在物理架构负载平衡器将是一个HW),则需要两个物理集群应用服务器联合Web服务器(因此,如果一个发生故障,用户不会失去他/她的长建立产品),最后一个数据库服务器。数据库服务器需要如果失败,可替换的主实例从备份实例。这应该提供合理的可用性和容错能力,并且只要提供良好的可扩展性作为一个单一的RDBMS能跟上负载,这应该是相当一段时间确定,因为大部分的操作都完成了内存使用状态bean只是偶尔存储或从DB中检索和数据量是低太多。有问题的部分可能是遥控库存系统的web服务,但随着它的产出在应用程序中应该没太好的缓存的依赖。

I've proposed an architecture consisting of a firewall (FW) and load balancer supporting sticky sessions and https (in the Cloud this would be replaced with EC2's Elastic Load Balancing service and FW on the app. servers, in a physical architecture the load-balancer would be a HW), then two physical clustered application servers combined with web servers (so that if one fails, a user doesn't loose his/her long built product) and finally a database server. The DB server would need a slave backup instance that can replace the master instance if it fails. This should provide reasonable availability and fault tolerance and provide good scalability as long as a single RDBMS can keep with the load, which should be OK for quite a while because most of the operations are done in the memory using a stateful bean and only occasionally stored or retrieved from the DB and the amount of data is low too. A problematic part could be the dependency on the remote inventory system webservice but with good caching of its outputs in the application it should be OK too.

不幸的是我已经对系统资源的只有模糊的概念(内存大小,数量和CPU的速度/核心),这样的平均Java EE应用程序的几百个用户的需求。根据实际亚马逊的产品我的粗糙,大多是没有根据的估计是,1.7GB和一个单一的,2芯现代CPU与周围的2.5GHz(高CPU中实例)的速度应该可以在任何两个应用程序服务器就足够了(因为我们可以通过配置更多的人应付更高的负载)。或者我会考虑使用大实例(64B,7.5GB RAM,2个核心为1GHz)

Unfortunately I've only vague idea of the system resources (memory size, number and speed of CPUs/cores) that such an "average Java EE application" for few hundred users needs. My rough and mostly unfounded estimate based on actual Amazon offerings is that 1.7GB and a single, 2-core "modern CPU" with speed around 2.5GHz (the High-CPU Medium Instance) should be sufficient for any of the two application servers (since we can handle higher load by provisioning more of them). Alternatively I would consider using the Large instance (64b, 7.5GB RAM, 2 cores at 1GHz)

所以我的问题是这样的部署到云中是否有技术和经济上可行或专用/ VPS服务器是否会是一个更好的选择,以及是否有一些与类似现实世界的经验。

So my question is whether such a deployment to the cloud is technically and financially feasible or whether dedicated/VPS servers would be a better option and whether there are some real-world experiences with something similar.

非常感谢你! /的Jakub神圣

Thank you very much! /Jakub Holy

PS:我已经找到了<一href="http://www.citytechinc.com/content/dam/citytechinc/pdf/CITYTECH_JBossEAP_AmazonEC2CaseStudy.pdf">JBoss EAP在一个云计算案例研究表明,它可以将现实世界中的Java EE应用程序部署到EC2云,但遗憾的是没有详细说明有关的拓扑结构,实例类型,或任何东西: - (

PS: I've found the JBoss EAP in a Cloud Case Study that shows that it is possible to deploy a real-world Java EE application to the EC2 cloud but unfortunately there're no details regarding topology, instance types, or anything :-(

推荐答案

我是从一个单一的EC2高C​​PU中实例服几百个用户。没有负载均衡,没有专门的数据库服务器,没有什么花哨可言。简单的一个盒子。另外我使用的一些服务:

I'm serving a "few hundred users" from a single EC2 High-CPU Medium instance. No load balancing, no dedicated DB servers, nothing fancy at all. Simply a single box. Additionally I'm using some services:

  • Elastic Block Store for MySQL data, MySQL binlogs and Lucene indexes
  • S3 for resource and backup storage, obviously different baskets for each
  • SimpleDB Metadata for resources
  • CloudFront for resources - mainly because we can :)
  • Simple Queue Service for messaging (used to queue some background tasks)

正如我所说的,没有什么特别的 - 至少在亚马逊的云环境。所有的一切都低于$ 200 /月。至于价格,你应该照顾,虽然。亚马逊做了很好的工作在混淆的主要成本。例如,在看CloudFront的定价,你可能看每GB 0.15 $,但忽略了$ 0.01每10,000 - 这是一个小得可笑的价格为大量的请求,是不是?大惊喜:我们CloudFront的成本的2/3是请求(每个请求大约3 KB)。 I / EBS为O请求是一个类似的故事。

As I said, nothing fancy - at least in Amazon's cloud environment. And everything for less than 200$/month. Regarding pricing, you should take care though. Amazon did a good job at obfuscating main costs. For example, looking at CloudFront Pricing, you might look at 0,15$ per GB but ignore 0,01$ per 10,000 - it's a ridiculously small price for a lot of requests, isn't it? Big surprise: 2/3 of our CloudFront cost is for requests (about 3 KB per request). I/O requests for EBS is a similar story.

因为这将是非常易于扩展(使用较大的情况下,移动分贝关系数据库服务)我会建议你开始使用相同的设置。正如你所说,在投入更多盒是​​pretty的简单(假设你的安装程序支持添加/飞删除节点)。这使得选择合适的设置通过试验和错误很容易可行的 - 一些彻底的负载测试应该做的工作。选择一些适合您​​的预期负载(加上一些额外的功率)和成长/你有生产数据,尽快缩小。

As it would be extremely easy to scale (use a bigger instance, move DB on Relational Database Service) I'd suggest you start with the same setup. As you said, throwing more boxes in is pretty simple (assuming your setup supports adding/removing nodes on the fly). This makes choosing the appropriate setup by trial and error easily feasible - some thorough load testing should do the job. Choose something that works for your expected load (plus some extra power) and grow/shrink as soon as you have production data.

作为一个结论:是的,这当然有可能举办的Java EE在EC2上的应用程序:)

As a conclusion: yes, it's certainly possible to host Java EE apps on EC2 :)

编辑:作为一个方面说明:比较EC2的定价与传统的主机是比较苹果和桔子 - 至少,只要你没有得到一个SLA为您的网络,几乎无限的可扩展性,没有硬件问题,几乎是无限的,冗余存储,不同的可用区域和一堆与它额外的服务。如果有人告诉你,传统的主机比较便宜,他可能是一个系统管理员担心自己的工作。)不要误会我的意思,它是便宜 - 但你得到的少的钱要少得多

as a side note: comparing pricing of EC2 with traditional hosting is comparing apples and oranges - at least as long as you don't get an SLA for your network, nearly unlimited scalability, no hardware issues, nearly unlimited and redundant storage, different availability zones and a bunch of extra services with it. If somebody tells you that traditional hosting is cheaper, he might be a sysadmin anxious about his job ;) Don't get me wrong, it is cheaper - but you get much less for a little less money.

顺便说一句,我绝不参加与亚马逊...但我觉得我应该得到回报,作为一个很好的代言人,应该不是我? :D

And by the way, I'm in no way affiliated with Amazon ... but I feel that I should be rewarded for being a good spokesman, shouldn't I? :D

这篇关于是云做好准备的企业Java Web应用程序?寻找一个Java EE托管咨询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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