The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Articles
Read more about TIBCO use cases, product features, capabilities and more
  • BW6.X - How to set-up an active / passive configuration in BusinessWorks 6.X


    By default when an appspace made of two appnodes is created, there is no shared state between the appnodes and deployed applications are running in active / active mode. This article explains how to configure an appspace to run applications in active / passive mode using the ‘ftgroup’ configuration option.

    How to configure an appspace to use ftgroup mode

    Copy the ‘appspace_config.ini_template’ file from the BusinessWorks config folder to a new .ini file (for example appspace_<APPSPACE_NAME>.ini file) and edit the file with the following :

    bw.engine.persistenceMode=ftgroup
    bw.engine.groupName=<APPSPACE_NAME> (you should set a value and usually the name of the appspace is used, for example ASFT01)
    bw.engine.groupProvider.technology=ems (this can be kept to the default value)
    bw.engine.groupProvider.qin.EMSServerUrl=tcp://localhost:7222,tcp://localhost:7222 (generally I use the data EMS to avoid to create a dependency between the appnodes and the technical EMS)
    bw.engine.groupProvider.qin.EMSUserName=admin
    bw.engine.groupProvider.qin.EMSPassword=admin

    The other properties can remain commented to keep their default values:

    #bw.engine.groupProvider.qin.EMSPrefix=EMSGMS
    #bw.engine.groupProvider.qin.EMSRecoveryTimeout=5000
    #bw.engine.groupProvider.qin.EMSRecoveryAttemptDelay=500
    #bw.engine.groupProvider.qin.EMSRecoveryAttemptCount=
    #bw.engine.groupProvider.qin.EMSConnectAttemptCount=
    #bw.engine.groupProvider.qin.EMSConnectAttemptDelay=

    Once the config file for the target appspace has been created, you can create an appspace with two appnodes each of them being hosted on a different server, that is a typical runtime configuration, with the following bwadmin commands:

    bwadmin create -d <DOMAIN_NAME> appspace <APPSPACE_NAME>

    bwadmin create -d <DOMAIN_NAME> -a <APPSPACE_NAME> -agent <AGENT_NAME1> -httpPort <PORT_NUMBER> appnode <APPNODE_NAME1>
    bwadmin create -d <DOMAIN_NAME> -a <APPSPACE_NAME> -agent <AGENT_NAME2> -httpPort <PORT_NUMBER> appnode <APPNODE_NAME2>

    Then the ftgroup configuration is applied to the appspace with the following command :

    bwadmin config -d <DOMAIN_NAME> -a <APPSPACE_NAME> -cf <APPSPACE_CONFIG_FILE>

    For example (note that ‘/’ have to used even on Windows):

    bwadmin config -d TESTEM -a ASFT01 -cf C:/tibco/bw/6.6/config/appspace_ASFT01.ini

    Once the appspace has been created you can start it and check both appnodes are running.

    1*6a-D-rSBKCnqpRH7b4uyWA.jpeg

    Note that if you are reconfiguring an existing appspace you need to stop and restart it for the change to be taken into account.

    Checking application statuses

    Unfortunately there is no way in the TEA to check the state of an appnode (active or passive) but once an application is started it is possible to check its Components (process starters) statuses from the Components tab of the Application panel :

    1*bjkJILHuPCpPoq1aJ0OA-Q.jpeg

    From the screen shot above we can see that Components are active on the appnode ASFT01_AN01 and conclude that this appnode is the active one. Only the application instance running in the appnode ASFT01_AN01 is processing incoming events.
    Note that on the ‘App Instances’ tab both application instances would appear as ‘Running’ and this is expected.

    Application statuses can also be checked using the bwagent REST API using the following method:

    GET /domains/{domain}/appspaces/{appspace}/applications/{name}/{version}/components

    For example :

    http://localhost:8079/bw/v1/domains/TESTEM/appspaces/ASFT01/applications/OrderProcessing.application/1.0/components

    1*B-tydAh9gmA8lyN8pgt_eQ.jpeg
    Component statuses returned by the REST API

    Important things to know about the ftgroup mode

    The active / passive state is managed at appnode level, this means that if an application running on the active appnode is inadvertently stopped there is no failover to the instance running on the passive appnode.

    The Activation property (Multiple AppNodes / Single AppNode) of the processes is not managed when using the ‘ftgroup’ mode (except when using the load balancing mode as explained thereafter).

    Active / passive mode with weights

    A limitation of active / passive configurations is that generally all appnodes are active on the same server, usually the first server to start, and the work load is not balanced.

    1*6VsApXuJUkWDRsxH913csg.png
    Active / passive configuration — All appnodes active on the same server

    Since BW 6.5 it is possible to configure appnodes with weights to distribute active appnodes across multiple servers.

    This can be done with the following properties, that have to be set in the config.ini file of each appnode:

    bw.engine.use.weighted.node=true
    bw.engine.node.weight=20

    The value shoud be between 1 and 99.

    In an appspace configured to run in ftgroup mode with appnodes configured with weights, when multiple appnodes are running the appnode with the highest weight becomes active.

    1*KuneJgpmCiq1EtkC6W9Kvw.png
    Active / passive configuration with weights — Active appnodes distributed across servers

    Mixing active / passive and active / active mode

    For some applications it is useful to have some processes to run in active / passive mode and some other processes to run in active / active mode.

    For example processes with File Poller Process Starters would run in active / passive mode and processes with JMS receiver Process Starters would run in active / active mode.

    This can be set-up by setting the following property in the appspace config.ini file or each appnode config.ini file:

    bw.engine.ftgroup.lbmode=true

    In such configuration the ‘Activation’ option set for each Processes will define the behavior of the Process Starter at runtime:

    . Single AppNode -> The process will run in Active / Passive mode

    . Multiple Nodes -> The process will run in Active / Active mode

    1*cmTBde81_CyZcsDz-f6T-Q.png

    Summary

    The ‘ftgroup’ mode provides a relatively simple way to run BusinessWorks applications in active / passive mode but it is important to keep in mind that the active / passive state is managed at appnode level. Also some advanced options are available to control appnode activation priorities and manage individual Component behavior.

    Reference information

    https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#administration/configuring-the-engi2.htm

    https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#administration/configuring-ems-as-t2.htm

    • Like 1

    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...