2

I have two content delivery servers in QA environment, where in live and staging services configured based on the load balance(NGNIX domain name e.g.abc.xyz.net) I was able to bring up all the services,successfully validate publishing to these servers.

I have configured active mq caching which is accessible on machine name e.g. servername:8161/admin. Referred "tcp://servername:61616?soTimeout=30000" in the remote synchronization node of deployer and content server. Successfully validate caching invalidation scenarios at deployer and web app level. Need help on following:

  1. how to configure active mq on load balance domain name?
  2. Do we need to load balance 61616 port on the servers? is this correct?
  3. tcp://servername:61616 - is not accessible out side the server? shall i open up firewall on the server to make it accessible ?
  4. Can I replace "tcp" with "http" to make it accessible and load balanced? will invalidation works post replacing "tcp" with "http". Please suggest.
2

Just to share my knowledge to answer your questions:

Q1: How to configure Active MQ on the load balance domain name?

A1: We could set up a different way of clustering setup for HA.

We did use the broker clustering - Shared File System Master Slave set up for failover. For this setup Load balance setup not required.

Broker clusters: The most common mental model of clustering in a JMS context is that there is a collection of JMS brokers and a JMS client will connect to one of them; then if the JMS broker goes down, it will auto-reconnect to another broker.

We implement this using the failover:// protocol in the JMS client. See the Failover Transport Reference page for details of how to configure the failover protocol.

This setup needs at least 3 nodes (or some odd number) to avoid issues with split brain during network partitions.

It needs shared network storage to persist the messages.

Install the ActiveMQ and configure the activemq.xml to a shared directory, ensure all the broker this config points to the same shared directory folder.

<persistenceAdapter>
    <kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>

ActiveMQ maintains information about schedules independent to the settings in the persistence adapter. With a shared file-system it is therefore important to tell ActiveMQ expressly where to store scheduler information. To do this, set the dataDirectory attribute on the broker, for example:

<broker xmlns="http://activemq.apache.org/schema/core"
dataDirectory="/some/location"
brokerName="mmuserb2" useJmx="true" advisorySupport="false"
persistent="true" deleteAllMessagesOnStartup="false"
useShutdownHook="false" schedulerSupport="true">

In the deployer and content services in cd_storage_conf.xml for clients should be using the Failover Transport to connect to the available brokers, for example:

<RemoteSynchronization>
                <Connector Class="com.tridion.cache.JMSCacheChannelConnector" Topic="Tridion">
                    <JndiContext>
                        <Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
                        <Property Name="java.naming.provider.url" Value="failover:(tcp://broker1-ipaddress-or-hostname,tcp://broker2-ipaddress-or-hostname:61616,tcp://broker3-ipaddress-or-hostname:61616)?randomize=false&amp;timeout=5000"/>
                        <Property Name="topic.Tridion" Value="Tridion-Live"/>
                    </JndiContext>
                </Connector>
</RemoteSynchronization>

Q2: Do we need to load balance 61616 port on the servers? is this correct?

A2: No and No

Q3: tcp://servername:61616 - is not accessible outside the server? shall I open up a firewall on the server to make it accessible?

A3: If you use to invalidate the caching in content-service, then yes ensure deployer and content services servers should have access to ActiveMQ servers on that port 61616.

Q3: Can I replace "tcp" with "http" to make it accessible and load balanced? will invalidation works post replacing "tcp" with "http".

A3: No and No

Supported and available different ActiveMQ TransportConnectors:

openwire: tcp://0.0.0.0:61616

amqp: amqp://0.0.0.0:5672

stomp: stomp://0.0.0.0:61613

mqtt: mqtt://0.0.0.0:1883

ws: ws://0.0.0.0:61614



Note:

Pros: Run as many slaves as required. Automatic recovery of old masters

Cons: Requires shared file system

I hope it helps.

  • Thanks for the information, I shall try configure and share my observations. – swapna Jul 10 at 18:16
  • I configured a shared directory for both load balancers and able to validate the caching scenarios. It is falling back to slave if master ActiveMq is down. Thanks for the pointers. – swapna Jul 15 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.