I have 2 instances of Jboss servers running on eg: 127.0.0.1 and 127.0.0.2.
I have implemented Jboss load balancing, but am not sure how to achieve server failover. I do not have a webserver to monitor the heartbeat and hence using mod_cluster is out the question. Is there any way I can achieve failover using only the two available servers?
Any help would be appreciated. Thanks.
JBoss clustering automatically provides JNDI and EJB failover and also HTTP session replication.
If your JBoss AS nodes are in a cluster then the failover should just work.
The Documentation refers to an older version of JBoss (5.1) but it has clear descriptions of how JBoss clustering works.
You could spun up another instance to server as your domain controller, and the two instances you already have will be your hosts. Then you could go through the domain controller, and it will do the work for you. However, I haven't seen instances going down to often, it usually servers that do, and it looks like you are using just one server (i might be wrong) for both instances, so i would consider splitting it up.
Related
I have configured two PostgreSQL 9.5 instances in master-slave mode and could successfully configure PgPool-II for load balancing between them, and failover is just working fine (took me 2 weeks and lots of errors, but it finally worked).
My question now is: imagine that one PostgreSQL server has multiple instances, and the second server also has multiple instances, each instance paired between the two servers in many ports, each port for each instance (of course), and each of these instances configured for master-slave replication. Is it possible to configure load balance and failover for all these instances with only one PgPool installation, or should I configure one PgPool for each PostgreSQL instance?
Thanks in advance,
Igor Felix
Since I have not found anything at Google, no one answered anything, and also nothing was found in the source code, I answer this question as not possible, or one pgpool for each postgres cluster.
We have five Wildfly (8.2.0-Final) servers running in different machines on the same network. When I start them, by default they come under a single cluster.
But I don't want this to happen. I want each of them act as a standalone server. I believe in JBoss-5 we can achieve this by passing -g option which would create a separate partition and thus a separate cluster.
Is there any similar option for WildFly? Please suggest. I don't want to run them in a cluster.
Thanks in advance.
If you do not want JBoss Wildfly to start in a cluster, use the non-HA standalone profiles such as standalone.xml or standalone-full.xml if you require messaging/JMS.
Hope it helps.
If you are particular to start with clustering mode and exclude clustering of two instance, change the jgroups address (udp/tcp) while starting
Got a general question about load balancing setup in JBoss (7.1.1.Final). I'm trying to setup a clustered JBoss instance with a master and slave node and I'm using the demo app here (https://docs.jboss.org/author/display/AS72/AS7+Cluster+Howto) to prove the load balancing/session replication. I've basically followed through to just before the 'cluster configuration' section.
I've got the app deployed to the master and slave nodes and if I hit their individual IPs directly I can access the application fine. According to the JBoss logs and admin console the slave has successfully connected to the master. However, if I put something in the session on the slave, take the slave offline, the master cannot read the item that the slave put in the session.
This is where I need some help with the general setup. Do I have to have a separate apache httpd instance sat in front of JBoss to do the load balancing? I thought there was a load balancing capability built into JBoss that wouldn't need the separate server, or am I just completely wrong? If I don't need apache, please could you point me in the direction of instructions to setup the JBoss load balancing?
Thanks.
Yes, you need a Apache or any other software or hardware that allows you to perform load balancing of the HTTP request JBoss Application Server does not provide this functionality.
For proper operation of the session replication you should check that the server configuration and the application configuration is well defined.
On the server must have the cache enabled for session replication (you can use standalone-ha.xml or standalone-full-ha.xml file for initial config).
To configuring the application to replicate the HTTP session is done by adding the <distributable/> element to the web.xml.
You can see a full example in http://blog.akquinet.de/2012/06/21/clustering-in-jboss-as7eap-6/
We're attempting to add standalone zookeeper servers into the zk ensemble ran by fuse fabric (as either followers or observers). However, it looks like fabric has pretty tight control over the zk configuration and I haven't been able to find any documentation relating to adding hardcoded server configuration params to the dynamic ones used by fabric. Anyone else try this or have some idea of where to look?
If I understand correctly the default JNDI service runs on my local AS, right? So if I create an EJB and in jboss.xml (running JBoss) I name it "sth" than it is registered in my AS. Correct?
In big projects EJBs might be distributed through many servers - on one server EJBs doing sth and on another sth else. When calling JNDI loopup() I search only one server, right? So it means that I need to know where the EJB is registered... Is it true?
When you cluster your app you will usually configure the cluster so that you have one shared JNDI. In JBoss you do this using HA-JNDI (High Availability - JNDI) or equivalent. This is a centralized service with fail-over. In principle you could imagine having a replicated service for better throughput, but to my knowledge that is not available in JBoss.
In short, you will have only one namespace, so you don't need to know where it is registered.