在生产中平稳调配战争吗? [英] Smooth redeployment of WAR in production?

查看:126
本文介绍了在生产中平稳调配战争吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一个顺利的方式将Java WAR重新部署到生产服务器(没有集群,没有OSGi)?

I was wondering if there is a 'smooth way' of redeploying a Java WAR to a production server (no cluster, no OSGi)?

我可以来与停止服务器,更新文件,重新启动服务器。 10分钟之前,我需要在网站上显示维护警告。

All I can come up with is stop server, update file, restart server. And 10 minutes beforehand I need to display a maintenance warning on the site.

你的方法是什么?

推荐答案

首先,热部署并不总是奏效。我们花了这么多的时间来确保每个新的模块都被加载,并且决定这不是值得的。所以你在做什么可能听起来不错,但它是部署新的WAR的最可靠的方法。

First, hot-deploy doesn't always work. We spent so much time to make sure every new module is loaded and decided it's not worth the trouble. So what you are doing may sound bad but it's the most reliable way to deploy a new WAR.

我们目前的方法是在负载平衡器前使用一个开关所有服务器。我们至少运行2个应用程序服务器实例。当我们关闭一台服务器进行维护时,流量会自动转到另一台服务器。

Our current approach is to use a switch with load-balancer in front of all servers. We run at least 2 instances of the application servers. When we shutdown one server for maintenance, the traffic automatically goes to the other one.

某些交换机真的很便宜。如果您没有足够的负载来证明一个新的框,并且您的2个实例可以在同一个框上运行。

Some of the switches are really inexpensive. If you don't have enough load to justify a new box and your 2 instances can run on the same box.

在某些情况下,交换机实际上可以节省资金。例如,我们有一个SSL页面,用于使用6个盒子,现在它在两个盒子上运行良好,SSL加速在交换机中。

In some circumstances, the switches can actually save money. For example, we have a SSL page that used to use 6 boxes and now it runs fine on 2 boxes with SSL acceleration in the switch.

这篇关于在生产中平稳调配战争吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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