The clustering module allows Jive Forums to work over a group of application servers, providing increased speed and fault-tolerance. Clusters are auto-configuring, have no single point of failure, and provide provide nearly linear scalability as additional servers are added.

At the heart of the clustering module is a distributed cache powered by Tangosol's Coherence. New forum content is automatically pushed to all servers in the cluster using optimistic style locking for maximum performance. Servers can join and leave the cluster at-will, and cluster node failures are transparently handled.

Cluster Architecture

The optimal clustering configuration will depend on your traffic needs, existing infrastructure, and budget. One possible clustering configuration is pictured below:

There are three layers to this setup:

  1. Load-balancer:

    Sitting between web surfers and the application servers is a load-balancing box. Every Jive Forums user has a session (represented by a unique cookie value) which allows stateful data to be maintained while they are using the forums. Each session is created on a particular application server, and then optionally distributed to other servers if the software allows it. If the load-balancer is "session-aware", that means it inspects the cookie value and always sends a user to the same application server for each request. Otherwise, the load-balancer will send requests to a random application server, which means that all session data must be constantly replicated between servers. Generally, session-aware load-balancing is more efficient so is the preferred solution. However, you should consult your application server documentation to find out what session replication or failover services it provides and recommends.

  2. Application Servers:

    In the middle-tier, multiple application servers are setup with Jive Forums and the clustering feature is enabled. Caches between the Jive Forums instances are automatically synchronized. If a particular application server fails, the load-balancer detects this and removes the server from the cluster.

  3. Database:

    All Jive Forums instances in a cluster must share the same database. Depending on your needs, a single database server may be used, or a cluster of database servers for increased performance and reliability. Consult your database vendor for more information about database clustering.

Setting up a Cluster

Clustering requires a valid Jive Forums Silver or higher license with two or more allowed cluster members. To check on the number of clustered servers your license allows, see the license information after logging into the Jive Forums administration tool.

Next, navigate to the cache panel, which is linked on the "Global Settings" tab. Toggle clustering to "on" and then save settings (note that this option will only be displayed if your license allows it). The server will automatically discover and join the cluster. You'll then see additional options in the cache panel to monitor cluster activity. Note: when clustering is enabled, there will be a 30 second delay when the first member of a cluster starts up. This is a necessary component of the clustering protocol.

You should also set the system time on each cluster member to match other cluster member's settings as closely as possible, or use a centralized time server.

Clustering FAQ

Do all cluster members need to be on the same local network?

The clustering module uses IP multicast to discover the cluster. This requires all cluster members to be on the same local network or for multicast traffic to be tunneled across multiple networks.

Is it possible to have more than one cluster per physical network?

Yes, this is possible. Coherence uses IP multicast to discover other cluster members. So, to isolate different clusters on the same physical network, you simply need to tell each cluster to use different multicast IPs or ports. There are two ways to do this:

  1. Edit the tangosol-coherence.xml file in the jivebase-5.5.0.jar file and change the following values:
    <multicast-listener>
      <address>224.2.2.245</address>
      <port>22245</port>
    </multicast-listener>
  2. Set Java system properties on each app-server (for example, in the app-server startup script) for the values tangosol.coherence.clusteraddress or tangosol.coherence.clusterport.

Should there be a separate jiveHome directory for each deployed WAR file?

Yes, each WAR should have a corresponding jiveHome directory.

How do attachments work in a cluster?

Starting in Jive Forums 4.0, attachment data can be stored in the database. This is the preferred attachment storage mode when clustering is enabled.

If you are using the filesystem attachment storage mode, all cluster members must share a single attachments directory on network attached storage. The default attachment directory is jiveHome/attachments. To use a different directory, set the "attachments.directory" property in the jive_startup.xml file on each server in the cluster to be a common directory. Be sure to copy all existing attachment files into your new directory.

Does searching work when clustering is enabled?

Yes, searching works without needing to make any special configuration changes. Each cluster member will maintain its own search index and update it with the latest data (when auto-indexing is enabled).

Do gateways work with clustering?

Yes, gateways will work transparently in a cluster.

How do config files work in a cluster?

Starting in Jive Forums 4.0, all configuration data (except bootstrap information such as database connection information) is stored in the database. Changing configuration settings on one cluster member will automatically update them on all other cluster members.

How do I set tangosol operational configuration parameters such as multicast port or address?

The default operational configuration parameters are specified in several places. Inside the coherence jar itself are the files tangosol-coherence.xml, and tangosol-coherence-override-prod.xml. Together, these two files contain the default settings for running coherence in production. Within the jive forums jar is the file tangosol-coherence-override.xml, which is where any changes to the settings in the previous two files should be made. The elements within these files are documented here.

As a developer, how do I add a cache of my own?

Starting in Jive Forums 5.5, all caches are defined in the file WEB-INF/classes/coherence-cache-config.xml. The format of this file is defined by tangosol, and is extensively documented here.

Note: There are a few jive-specific initialization parameters used within our version of this file which are ignored by tangosol. They are named 'jive-small-size', 'jive-medium-size', and 'jive-large-size'. The values of these parameters are sizes in kilobytes, and are used to display cache size presets within the administration console.