如何在不停机的情况下更新我的 Java EE 应用程序?
如何自动化(无停机)部署?
并能够关闭任何服务器进行维护。
我应该使用什么工具?
我正在使用 Tomcat,但我愿意迁移到最适合所提出的要求的其他 Java EE 服务器。
我想知道准备使用的配置详细信息。
How may I automate (no downtime) deployment?
And be able to turn any server off for maintenance.
What tools should I use?
I am using Tomcat but I am willing to move to other Java EE server best suited for the requirements presented.
I would like to know ready to use configuration details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您有两个 tomcat 在集群中运行(在负载均衡器后面或在 apache 后面),这真的很容易。
如果您要完全重新部署应用程序,任何其他情况都会导致停机(无论多么短暂)。
如果您可以容忍少量的停机时间(<1 秒),那么您可以通过部署到 tomcat 的第二个实例来模拟这一点,然后将负载均衡器指向第二个实例。在这种情况下,您将丢失所有活动会话,但切换速度应该非常快。
在这两种情况下,您都必须解决数据库同步问题。
If you have two tomcat's running in a cluster (behind a load balancer or behind apache), it's really easy.
Anything else will result in downtime (however brief) if you're doing a full redeployment of your application.
If you can tolerate a small bit of downtime (<1 sec), then you can emulate this by deploying to a second instance of tomcat, then point your load balancer to the second instance. In this case, you will lose any active sessions, but the switch should be real fast.
In both cases there are database synchronization issues that you will have to address though.
从 WebLogic 9 开始,WebLogic 具有允许在不停机的情况下部署新版本应用程序的功能,称为并行部署:
WebLogic Server 还支持整个服务器级迁移,其中可迁移服务器实例及其所有服务被迁移到不同的物理计算机。这可以用于服务器维护。
请注意,并非所有平台都支持整个服务器迁移,并且显然具有不可忽略的成本(就基础设施而言)。
Since WebLogic 9, WebLogic has a feature allowing to deploy a new version of an application without downtime which is called side-by-side deployment:
WebLogic Server also supports whole server-level migration, where a migratable server instance, and all of its services, is migrated to a different physical machine. This could be used for server maintenance.
Note that whole server migration is not supported by all platforms and has obviously a non negligible cost (in terms of infrastructure).