简体   繁体   English

具有高可用性的Wildfly9域模式集群部署

[英]Wildfly9 domain mode cluster deployment with High Availablity

We have a web application which works fine on Wildfly9 standalone mode. 我们有一个Web应用程序,可以在Wildfly9独立模式下正常运行。 Currently its on a single server. 目前它在一台服务器上。 We want to add one more server to avoid high traffic and downtime issue. 我们希望再添加一台服务器以避免高流量和停机问题。

I am trying to follow the steps mentioned in https://docs.jboss.org/author/display/WFLY9/WildFly+9+Cluster+Howto?_sscc=t . 我正在尝试按照https://docs.jboss.org/author/display/WFLY9/WildFly+9+Cluster+Howto?_sscc=t中提到的步骤进行操作。 But this deployment is referring domain mode. 但是这种部署是指域模式。

Can we use clustering and load balancing using standalone mode? 我们可以使用独立模式使用群集和负载平衡吗?

If answer to above question is no then we are thinking of deploying application to domain mode on two different server and also add load balancer. 如果对上述问题的答案为否,那么我们正在考虑在两个不同的服务器上部署应用程序到域模式,并且还要添加负载均衡器。

I tried to deploy application war in domain mode but our application refer many configuration files which are outside war. 我尝试在域模式下部署应用程序war,但是我们的应用程序引用了许多外部战争的配置文件。

  1. Is there any way using which I can provide path to config file/directory? 是否有任何方法可以提供配置文件/目录的路径?
  2. Do I need to put these config files in war itself? 我是否需要将这些配置文件置于战争中?
  3. Do I need to configure application somehow to look for these files from WILDFLY_HOME? 我是否需要以某种方式配置应用程序以从WILDFLY_HOME中查找这些文件?

Any pointers will be helpful. 任何指针都会有所帮助。

Thanks. 谢谢。

It is possible to use standalone with high availabilty. 可以独立使用,具有高可用性。 There is this document describing this mode: https://docs.jboss.org/author/display/WFLY8/Load+Balanced+HA+Standalone+Cluster+-+Howto 该文档描述了这种模式: https//docs.jboss.org/author/display/WFLY8/Load+Balanced+HA+Standalone+Cluster+-+Howto

However, I only found this document for Wildfly 8, but afaik it should work on wildfly 9 as well. 但是,我只为Wildfly 8找到了这个文件,但是afaik也可以用于wildfly 9。

Can we use clustering and load balancing using standalone mode? 我们可以使用独立模式使用群集和负载平衡吗?

Yes, you can deploy you application in both standalone and domain mode with load balancing and clustering. 是的,您可以使用负载平衡和群集在独立模式和域模式下部署应用程序。

I tried to deploy application war in domain mode but our application refer many configuration files which are outside war. 我尝试在域模式下部署应用程序war,但是我们的应用程序引用了许多外部战争的配置文件。

There are multiple ways to provide configuration files 有多种方法可以提供配置文件

  1. You can put config files in the war itself. 您可以将配置文件放入战争本身。
  2. You can put config files under some location and set values in Configuration: System Properties. 您可以将配置文件放在某个位置,并在Configuration:System Properties中设置值。
  3. You can also put these file under some location and mount that location to another server. 您还可以将这些文件放在某个位置,并将该位置安装到另一台服务器。 So that both servers refer same configuration and modifying config at one location will reflect change for both servers. 因此,两个服务器都引用相同的配置,并且在一个位置修改配置将反映两个服务器的更改。

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

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