Glassfish 3 EJB 应用程序部署建议?
由于各种不幸的管理原因(预算限制等),我(开发人员)被安排在生产环境中部署应用程序。问题是我没有任何生产 EJB 应用程序服务器部署的经验。也就是说,他们知道没有成功的保证。
背景:
- 开发服务器在最新版本的 Netbeans 和 Glassfish v3 上运行,在 mac 机器上
- 98% / 99% 的正常运行时间还可以,没有财务/关键交易
- 它是一个客户端/服务器 EJB 3 应用程序,以及 Web 层、业务层层和资源层当前在同一台计算机上运行。
- 我可以自由选择硬件/软件基础设施
- 负载估计:平均 10 个同时连接,罕见 200 个峰值
- 出站公共数据是文本/小图片(适用于 iPhone 客户端),仅入站 HTTP 文本
- 基本维护将得到处理(备份、服务器重新启动等)
生产部署的我的问题:
- 基础设施方面必须具备什么?最低系统规格等?
- 保留 Glassfish v3 可以吗?
- 我应该关注服务器的哪些配置方面?
- 最坏的情况:如果我部署与开发期间相同的软件基础设施 (Netbeans/Glassfish v3),服务器能否跟上?
任何建议都将受到欢迎。谢谢!
For a variety of unfortunate management reasons (budget constraints etc.) I, the developer, have been put in the position to deploy the app in a production environment. The catch is that I don't have any experience in production EJB application server deployment. That said, they are aware that there are no guarantees of success.
The context:
- The dev server runs on the latest version of Netbeans with Glassfish v3, on a mac machine
- 98% / 99% uptime is ok, there are no financial/critical transactions
- It is a client/server EJB 3 app, and the web tier, business tier, and resource tiers currently run on the same machine.
- I have the liberty to choose the hw/sw infrastructure
- Load estimations: 10 simultaneous connexions avg, rare 200 peaks
- The outbound public data is text/small pics (it's for iPhone clients), inbound HTTP text only
- Basic maintenance will be taken care of (backup, server reboot, etc)
My questions for production deployment:
- What are the must haves infrastructure-wise? Minimum system specs etc?
- Is it ok to keep Glassfish v3?
- Which configuration aspects of the server should I focus on?
- Worst case scenario: if I deploy the same software infrastructure (Netbeans/Glassfish v3) as during the development, would the server keep up?
Any piece of advice would be most welcome. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于架构,您可以从一个没有前端 Web 服务器的 GlassFish 实例开始(GlassFish 有一个功能非常强大的内置实例)。如果您可以等待 GlassFish 3.1 的发布,您将能够添加实例(集群或独立)并提供可扩展性和集中管理。
我见过的大多数 GlassFish 生产实例都使用 1GB-2GB 的 JVM 堆 (-Xmx) 运行,但如果您在内存中加载大量数据或使用某些框架,您的情况可能会有所不同。如果您想要更好的可靠性,将它们放在单独的机器上显然是一个优势。通过同一台计算机上的两个实例,您可以在一个实例发生故障时提供服务连续性(但如果计算机发生故障则无法提供服务)。
我建议使用“asadmin”命令行工具尽可能编写资源配置(连接池、JDBC 数据源等)和应用程序的脚本,并尽量不在生产平台上使用 NetBeans。
使用模拟负载进行基准测试听起来是明智之举,在上线之前尝试将其放在一起生存指南可能会派上用场。
你没有提到数据库。没有一个吗?
For the architecture, you can start small with just a single GlassFish instance with no front web server (GlassFish has one built in that is very capable). If you can wait for the release of GlassFish 3.1 you'll be able to add instances (clustered or standalone) and offer scalability and centralized admin.
Most production instances of GlassFish I've seen run with 1GB-2GB of JVM heap (-Xmx) but your mileage may vary if you load lots of data in memory or if you use some frameworks. If you want better reliability, having them on separate machines is a plus obviously. With two instances on the same machine you can offer continuity of service if one instance fails (but not if the machine fails).
I'd suggest scripting as much as possible the provisioning of the resources (connection pool , JDBC datasource, etc...) and applications using the "asadmin" command-line tool and try to not use NetBeans on the production platform.
Benchmarking with simulated load sounds like a wise thing to try to put together before going live and this survival guide will probably come in handy.
You don't mention the database. Isn't there one?
我建议如下:
系统架构:
我希望这将有助于启动和休息,您可以在进行过程中提出问题或解决问题。
祝你好运。
I suggest the following:
System Architecture:
I hope this will help to kick start and rest you can ask or solve as you go along.
Good luck.