简体   繁体   English

使用MySQL的Java EE应用程序 - 我应该使用什么云服务?

[英]Java EE Application with MySQL - What Cloud Service Shall I Use?

I have developed a rather small application with Java EE, Hibernate, MySQL and Tomcat. 我用Java EE,Hibernate,MySQL和Tomcat开发了一个相当小的应用程序。 Now I would like to host it on a cloud service. 现在我想将它托管在云服务上。 I considered three options: 我考虑了三种选择:

  • Amazon EC2 (PaaS how to manage MySQL here?) 亚马逊EC2(PaaS如何在这里管理MySQL?)
  • Windows Azure (I actually deployed a hello world java app there, so it works. But what about MySQL?) Windows Azure(我实际上在那里部署了一个hello world java app,所以它可以工作。但是MySQL呢?)
  • Google App Engine (No clue about that) 谷歌应用引擎(没有任何线索)

I assume max. 我假设最大。 5 concurrent Users and very few data sets (<10.000). 5个并发用户和极少数数据集(<10.000)。 EDIT: I don't need lotd of CPU power. 编辑:我不需要很多CPU电源。

I am not sure about what service to use in terms of technology (especially MySql) and in terms of costs (shouldn't be more than 20$/15€ a month). 我不确定在技术(尤其是MySql)和成本方面使用什么服务(每月不应超过20美元/ 15欧元)。

Can someone experienced please recommend an option. 有人可以体验请推荐一个选项。 Also I would like to know the reasons behind that. 我也想知道背后的原因。 Thank you 谢谢

Amazon has a free tier. 亚马逊有免费套餐。 http://aws.amazon.com/free/ http://aws.amazon.com/free/

Check that out. 检查出。

You could most likely get away with booting two micro instances, one for the application, Tomcat, and one for MySQL. 您很可能会启动两个微实例,一个用于应用程序,一个用于Tomcat,一个用于MySQL。 You are going to want to run the MySQL database on an EBS volume. 您将要在EBS卷上运行MySQL数据库。 And maybe the application depending on what it does. 也许应用程序取决于它的功能。 Then create two security groups, one for the application with web ports (80, 8080, 443, etc) open to the world (and maybe ssh open to your IP, or the world if you're crazy) and one security group for MySQL server with port 3306 open to the app security group. 然后创建两个安全组,一个用于具有向世界开放的Web端口(80,8080,443等)的应用程序(可能ssh对您的IP开放,如果您疯了,则为世界)和一个用于MySQL的安全组端口3306的服务器对应用安全组开放。 See http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-network-security.html . 请参阅http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-network-security.html

Then I would make an Elastic IP and put it on the web server, I use Route53 for my DNS because it is easy, then you put that Elastic IP as your A record for the site/application. 然后我会制作一个弹性IP并将其放在网络服务器上,我使用Route53作为我的DNS,因为它很简单,然后你把那个弹性IP作为你的网站/应用程序的A记录。

Watch the monitors and if you get more load, snap shot each server as an AMI and boot new ones that are larger than the micros. 观察显示器,如果您获得更多负载,请将每个服务器拍摄为AMI并启动大于微处理器的新服务器。 If you use EBS backed AMI's it will help for this. 如果您使用EBS支持的AMI,它将有助于此。

NOTE: t1.micros are not really very good, and you will get all your CPU stolen by Amazon if you tax it hard, so it is best to only use them if you are not going to get much load. 注意:t1.micros并不是非常好,如果您对它征税,您将会被亚马逊窃取所有CPU,因此最好只在您不会负担太多的情况下使用它们。

Obviously there are other charges, such as storage and data transfer, but they are usually cheap. 显然还有其他收费,例如存储和数据传输,但它们通常很便宜。

If you think these servers are going to run for a year or more, you could also reserve them, which cuts the cost for everything beyond the free tier. 如果您认为这些服务器将运行一年或更长时间,您也可以保留它们,从而降低免费套餐之外的所有内容。

I would recommend AWS. 我会推荐AWS。 It will allow you to scale up your application easily once you get the flow down. 一旦流程结束,它将允许您轻松扩展应用程序。

AWS has a variety of services that help you manage and scale your app. AWS提供各种服务,可帮助您管理和扩展应用程序。 I have been happy with it. 我很高兴。

Jelastic Multi-Cloud PaaS is the best cloud hosting platform for Java EE applications, because it's a vendor neutral solution providing a wide choice of application servers such as GlassFish, Payara , WildFly , TomEE (and others) with out-of-box automatic scaling and clustering. Jelastic Multi-Cloud PaaS是Java EE应用程序的最佳云托管平台,因为它是供应商中立的解决方案,提供多种应用服务器,如GlassFish,PayaraWildFlyTomEE (以及其他),具有开箱即用的自动扩展功能和聚类。 There is also solution for MySQL Clustering with an easy setup in a few clicks. 还有MySQL Clustering解决方案,只需点击几下即可轻松完成设置。 The service is offered worldwide by trusted hosting providers and available in 60+ data centers . 该服务由全球信赖的托管服务提供商提供,并在60多个数据中心提供 Its unique “pay-as-you-use” model offers strategies for cost reduction in the cloud . 其独特的“按使用付费”模式提供了降低云计算成本的策略。 So taking into account all these aspects, Jelastic is simply the best Platform-as-a-Service for Java developers on the market. 因此,考虑到所有这些方面,Jelastic只是市场上Java开发人员的最佳平台即服务。

Cloud Foundry should be a great hosting environment with your requirements, ie Java EE, Hibernate, MySQL. Cloud Foundry应该是一个很好的托管环境,符合您的要求,即Java EE,Hibernate,MySQL。 It is still in beta, and is free for now. 它仍然处于测试阶段,现在是免费的。

It supports Java EE, Hibernate, MySQL and Tomcat. 它支持Java EE,Hibernate,MySQL和Tomcat。 Moreover since it is a PaaS, provisioning the MySql database is just one command. 此外,由于它是PaaS,因此配置MySql数据库只是一个命令。

You can sign up at https://my.cloudfoundry.com/signup 您可以在https://my.cloudfoundry.com/signup注册

Relevant docs to get started for your use case are: 为您的用例开始的相关文档是:

Check that out. 检查出。 https://codenvy.com/dashboard/#/dashboard Tomcat, MySQL, etc.... https://codenvy.com/dashboard/#/dashboard Tomcat,MySQL等....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM