We all know that JBoss is so flexible due to which it is becoming everyone’s favourite application server, once of these flexibility is also given with Apache to communicate with JBoss and they are mod_jk and mod_cluster. Now it is totally dependent on you which one should be used as per your environment and requirement. However from both of them mod_cluster is one of the modules which is been loved by many people and the reason for it is because of the below main features of it.

  • Dynamic configuration: Like other httpd-based load balancers most of them requires an explicitly configuration from the proxy end, hence if you need to add a new server to serve clients request we need to restart the front-end. Based on this the bulk of the proxy’s configuration is on the application servers rather then in front-end, thus now the set of proxies to which an application server will communicate is determined either by a static list or using dynamic discovery via the advertise mechanism. So now you can add new servers without disturbing Apache.
  • AJP is optional: mod_cluster does not only uses AJP to communicate with application server nodes instead it can use HTTP, HTTPS, or AJP as well
  • Web application lifecycle control: In mod_cluster, each application server forwards all the web application context lifecycle events to the proxy informing, so that one can control the web application by starting / stopping it which helps in routing requests for a given context to that server.

Advantages and Great features of mod_cluster :

Apache parameters comparison from Weblogic to JBoss

Now when you are planning the migration from weblogic to JBoss, some of the main issue which comes are from the plug-ins to the configuration and which parameters are out there similar to weblogic in JBoss, hence we would share some of the basic parameters which are been used to start communicating with JBoss.

  1. The first thing is the host name parameter which tells Apache to communicate with which server it has to connect, in weblogic it was WebLogicHost where as in JBoss its worker.node1.host (where “node1” is a name given for the JBoss node)
  2. Then comes the port number parameter in weblogic it is WebLogicPort where as in JBoss its worker.node1.port (where “node1” is a name given for the JBoss node)
  3. In weblogic they have a parameter which is used for giving the list of weblogic server which are in cluster WebLogicCluster, in JBoss it is worker.loadbalancer.balance_workers which takes the list of defined number of nodes which is the combination of first two points.
  4. For making sure which sure which file context should pass through weblogic used MatchExpression, where as JBoss uses JkMount and it also make suers that the one context should to be sent to a particular JBoss node or to the cluster list
  5. Error page is one of the basic need for any organizations environment and weblogic uses ErrorPage parameter for it, where as JBoss uses ErrorDocument

These were some basic parameters comparisons, to get more information on the parameters from mod_jk and mod_cluster you can have a look at the below links which would give you all the information and definition on them.

Tuning Apache for JBoss

Samuel Mendenhal has create a web based tool which would generate you Apache side configuration on the bases of the input given to the tool, this tool also helps in tuning the Apache configuration on various factors like number of requests/CPU’s/etc

  1. Apache -> JBoss Loadbalancing Configuration Generator

  2. Cluster and Loadbalancing Configuration Generator (Beta)

Note: The second link is a BETA release which can even be used to tune the Community as well as Enterprise version of JBoss

Particle examples for Weblogic to JBoss Migration

As promised below are some particle examples which would surely help you guys to migrate your Apache from weblogic to JBoss configuration.

  1. Configuration Apache for JBoss
  2. JBoss: Configuring mod_jk to connect to JBoss
    JBoss: How to configure mod_cluster with JBoss ?

  3. For static contents configuration from Apache side
  4. Weblogic : Apache Proxy as Static Content Repository
    JBoss : Apache as static content repository for JBoss AS7

  5. Error page configuration from Apache side
  6. JBoss : Custom error pages in Apache for JBoss AS7

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.