Sample PubSub+ Cache Configuration

As message rates and topic space grows, you might want to divide the topic space amongst multiple Cache Clusters. This is done by configuring several Cache Clusters on the Designated Router, each with a unique subscription set. The Cache Clusters are grouped together through configuration on the Designated Router, to form a Distributed Cache.

This example describes the tasks required to configure and start the PubSub+ Cache configuration shown in the figure below.

Distributed PubSub+ Cache Configuration Example

Distributed SolCache Configuration Example

Configuration Information

This example assumes a network with PubSub+ Cache Instances running on one event broker (the Designated Router), and two Linux computers. Each of these three machines are hosting the following three individual PubSub+ Cache Instances, for a total of nine PubSub+ Cache Instances:

  • one PubSub+ Cache Instance for Cache Cluster bob
  • one PubSub+ Cache Instance for Cache Cluster joe
  • one PubSub+ Cache Instance for Cache Cluster fred

Further, this example assumes that the three Cache Clusters are being used to create a Distributed Cache associated with Message VPN blue, where:

  • Cache Cluster bob is responsible for the topic “animals/cats/>”
  • Cache Cluster joe is responsible for the topic “animals/bears/>”
  • Cache Cluster fred is responsible for the topic “animals/dogs/>”

Thus, the Designated Router for the Distributed Cache in this example is configured (through either CLI or SEMP) with the following information:

  • Message VPN blue
    • Distributed Cache zoo

    • Cache Cluster bob

      PubSub+ Cache Instances bob1, bob2, bob3

      Topics: animals/cats/>

      Configuration file data for PubSub+ Cache Instances bob1, bob2, and bob3:

      bob1bob2bob3
      CACHE_INSTANCE_NAME bob1
        SESSION_USERNAME cache 
        SESSION_PASSWORD cache 
        SESSION_HOST <msg-backbone_ip> (for Designated Router) 
        SESSION_VPN_NAME blue 
        SESSION_CLIENT_NAME inst_bob1
      CACHE_INSTANCE_NAME bob2   
        SESSION_USERNAME cache
        SESSION_PASSWORD cache
        SESSION_HOST <msg-backbone_ip> (for Designated Router)
        SESSION_VPN_NAME blue   
        SESSION_CLIENT_NAME inst_bob2
      CACHE_INSTANCE_NAME bob3   
        SESSION_USERNAME cache
        SESSION_PASSWORD cache
        SESSION_HOST <msg-backbone_ip> (for Designated Router)
        SESSION_VPN_NAME blue
        SESSION_CLIENT_NAME inst_bob3
  • Cache Cluster joe

    PubSub+ Cache Instances joe1, joe2, joe3

    Topics: animals/bears/>

    Configuration file data for PubSub+ Cache Instances joe1, joe2, and joe3:

    joe1joe2joe3
    CACHE_INSTANCE_NAME joe1   
      SESSION_USERNAME cache   
      SESSION_HOST <msg-backbone_ip>(for Designated Router)   
      SESSION_PASSWORD cache   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_joe1
    CACHE_INSTANCE_NAME joe2   
      SESSION_USERNAME cache   
      SESSION_PASSWORD cache   
      SESSION_HOST <msg-backbone_ip> (for Designated Router)   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_joe2
    CACHE_INSTANCE_NAME joe3   
      SESSION_USERNAME cache   
      SESSION_PASSWORD cache   
      SESSION_HOST <msg-backbone_ip> (for Designated Router)   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_joe3
  • Cache Cluster fred

    PubSub+ Cache Instances fred1, fred2, fred3

    Topics: animals/dogs/>

    Configuration file data for PubSub+ Cache Instances fred1, fred2, and fred3:

    fred1fred2fred3
    CACHE_INSTANCE_NAME fred1   
      SESSION_USERNAME cache   
      SESSION_PASSWORD cache   
      SESSION_HOST <msg-backbone_ip> (for Designated Router)   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_fred1
    CACHE_INSTANCE_NAME fred2   
      SESSION_USERNAME cache   
      SESSION_PASSWORD cache   
      SESSION_HOST <msg-backbone_ip> (for Designated Router)   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_fred2
    CACHE_INSTANCE_NAME fred3   
      SESSION_USERNAME cache   
      SESSION_PASSWORD cache   
      SESSION_HOST <msg-backbone_ip> (for Designated Router)   
      SESSION_VPN_NAME blue   
      SESSION_CLIENT_NAME inst_fred3

Distributed PubSub+ Cache Configuration

As of appliance release 8.2.0, operations that could only be performed by root, can now also be performed by a Sysadmin User. For information on configuring Sysadmin Users, refer to Configuring Multiple Linux Shell Users.

The following configuration results in the Distributed Cache topology shown in the figure, Distributed PubSub+ Cache Configuration Example.

  1. If not done already, unlock the PubSub+ Cache feature on the Designated Router:
    solace>enable
    solace# admin
    solace(admin)# product-key <key-value>
    solace(admin)# exit
  2. Create the Distributed Cache zoo:
    solace# configure
    solace(config)# create distributed-cache zoo message-vpn blue
    solace(config-distributed-cache)#
  3. Create the Cache Cluster bob:

    solace(config-distributed-cache)# create cache-cluster bob
    solace(config-distributed-cache-cluster)#
  4. Add topic animals/cats/> to Cache Cluster bob:
    solace(config-distributed-cache-cluster)# 
    topic animals/cats/>
  5. Create and start PubSub+ Cache Instances bob1, bob2, and bob3 under the Cache Cluster bob:
    solace(config-distributed-cache-cluster)# create cache-instance bob1
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance bob2
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance bob3
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)#

    Then, following the instructions provided within the sampleConfig.txt file, edit an individual copy of the file with the specifics for your PubSub+ Cache configuration for each PubSub+ Cache Instance. Choose a name for each configuration file (for example, Configbob1.txt, Configbob2.txt, Configbob3.txt) and save the “bob1” configuration file to /usr/sw/solcache/config onto Router #1 through the ‘user root access’ account, the “bob2” configuration file onto Linux Server #1, and the “bob3” configuration file onto Linux Server #2.

    Following the steps described within the README file (included with the PubSub+ Cache installation package), start the PubSub+ Cache Instances through the ‘user root access’ account on Router #1, and start the PubSub+ Cache Instances on Linux Server #1 and Linux Server #2.

  6. Start the Cache Cluster bob:
    solace(config-distributed-cache-cluster)# no shutdown
    solace(config-distributed-cache-cluster)# exit
  7. Create the Cache Cluster joe:
    solace(config-distributed-cache)# create cache-cluster joe
    solace(config-distributed-cache-cluster)#
  8. Add topic “animals/bears/>” to Cache Cluster joe:
    solace(config-distributed-cache-cluster)# topic animals/bears/>
  9. Create and start PubSub+ Cache Instances joe1, joe2, and joe3 under the Cache Cluster joe:
    solace(config-distributed-cache-cluster)# create cache-instance joe1
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance joe2
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance joe3
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit

    Then, following the instructions provided within the sampleConfig.txt file, edit an individual copy of the file with the specifics for your PubSub+ Cache configuration for each PubSub+ Cache Instance. Choose a name for each configuration file (for example, Configjoe1.txt, Configjoe2.txt, Configjoe3.txt) and save the Configjoe1 file to /usr/sw/solcache/config onto Router #1 through the ‘user root access’ account, the Configjoe2 file onto Linux Server #1, and the Configjoe3 file onto Linux Server #2.

    Following the steps described within the README file (included with the PubSub+ Cache installation package), start the PubSub+ Cache Instances through the ‘user root access’ account on Router #1, and start the PubSub+ Cache Instances on Linux Server #1 and Linux Server #2.

  10. Start the Cache Cluster joe:
    solace(config-distributed-cache-cluster)#
    solace(config-distributed-cache-cluster)# no shutdown
    solace(config-distributed-cache-cluster)# exit
  11. Create the Cache Cluster fred:
    solace(config-distributed-cache)# create cache-cluster fred
  12. Add topic “animals/dogs/>” to Cache Cluster fred:
    solace(config-distributed-cache-cluster)# topic animals/dogs/>
  13. Create and start PubSub+ Cache Instances fred1, fred2, and fred3 under the Cache Cluster fred:
    solace(config-distributed-cache-cluster)# create cache-instance fred1
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance fred2
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)# create cache-instance fred3
    solace(config-distributed-cache-cluster-instance)# no shutdown
    solace(config-distributed-cache-cluster-instance)# exit
    solace(config-distributed-cache-cluster)#

    Then, following the instructions provided within the sampleConfig.txt file, edit an individual copy of the file with the specifics for your PubSub+ Cache configuration for each PubSub+ Cache Instance. Choose a name for each configuration file (for example, Configfred1.txt, Configfred2.txt, Configfred3.txt) and save the Configfred1 file to /usr/sw/solcache/config onto Router #1 through the ‘user root access’ account, the Configfred2 file onto Linux Server #1, and the Configfred3 file onto Linux Server #2.

    Following the steps described within the README file (included with the PubSub+ Cache installation package), start the PubSub+ Cache Instances through the ‘user root access’ account on Router #1, and start the PubSub+ Cache Instances on Linux Server #1 and Linux Server #2.

  14. Start the Cache Cluster fred:
    solace(config-distributed-cache-cluster)# no shutdown
    solace(config-distributed-cache-cluster)# exit
  15. Start the Distributed Cache zoo:
    solace(config-distributed-cache)# no shutdown
  16. Run the start Distributed Cache Admin EXEC command to put all PubSub+ Cache Instances into service:
    solace(config-distributed-cache)# exit
    solace(config)# exit
    solace# admin
    solace(admin)# distributed-cache zoo message-vpn blue
    solace(admin-distributed-cache)# start