![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
For this example, let us assume that we are multicasting two streams of data: a fast data feed to some high performance processes on a 1 Gb network, and on a separate 100 Mb network a slower stream to a number of desktop applications. This leads us to the architecture shown in Figure 20:Figure 20 Sample Multicast Deployment ArchitectureInstallation is straightforward, as described in the TIBCO Enterprise Message Service Installation. The only requirement above a regular EMS installation is that the multicast daemon must be running on any machine that receives multicast data.On Windows systems, you can register the multicast daemon as a service using the emsntsrg utility. See emsntsrg on page 112 for more information.Before sending multicast data, first the EMS server needs to be configured. Configuring the EMS server requires you to change some global settings in the tibemsd.conf file, and to configure multicast channels in the channels.conf file. After channels are configured, you enable topics for multicast by setting their channel properties in the topics.conf file.To begin, some general settings must be configured in the EMS server's main configuration file, tibemsd.conf:
• You should have added the following lines to the tibemsd.conf:
You may also want to add MULTICAST to the server's startup_abort_list, if multicast is required in your architecture.The next step configures the multicast channels. In this example there are two multicast channels, mcast-1Gb and mcast-100Mb. The section Sample channels.conf Settings below shows specific settings for these steps:
1. Create the channels.conf file.
2.
4. For this example, the server is on a multi-homed machine so we must explicitly specify interfaces for each channel. If an interface is not specified, the EMS server uses the default interface. Note that this is also true for the multicast daemon. Use the -ifc command line parameter when running multicast daemons on multi-homed machines, described in Command Line Options.The maxrate parameter restricts the rate at which the server sends messages over the channel. See Estimating the Maxrate below for a discussion of how the maxrate was determined.When you have completed your channel configuration, the channels.conf file should contain the following lines:In this example, we have set the maxrate properties using arbitrary network usage numbers to arrive at an estimate of network capacity. The process used to estimate the maxrate can be described as follows:These initial rates are for testing purposes, and these will be modified later to maximize performance. Remember the cardinal rule with multicast performance is that sometimes you have to slow down to speed up. A rate that is too high will induce loss, which in turn causes messages to be resent, slowing the actual rate to something far below what your network is capable of.
After the channels are defined, you must set the channel properties for topics so the server will send messages using multicast to multicast-enabled consumers subscribed to the topics. The channel property is set in the topics.conf configuration file.In this example, we use two topics, feed-1Gb and feed-100Mb. These topic names are arbitrary; the key is assigning the correct channels to the topics.
• The client must use a session mode of NO_ACKNOWLEDGE when subscribing to the multicast topic. See Creating a Multicast Consumer for more information.
• To set up a multicast exception listener using the C API, see the TIBCO Enterprise Message Service C & COBOL API Reference.To set up a multicast exception listener using the .NET API, see the TIBCO Enterprise Message Service .NET API Reference, available through the HTML documentation interface.It is valuable to know what EMS data rates the network can accommodate. If your application can handle data at least as fast as your network can, you will encounter the unusual situation where the network is your throughput bottleneck, which is ideal—as long as those data rates meet your requirements.Now that the server is enabled, you can test and fine tune the maxrate specified for the channels. This section describes one method for testing your settings.
1. Start the EMS server using the -trace FLOW option, as described in Starting the EMS Server Using Options.
2. From the command line, start the multicast daemon, using the tibemsmcd -trace command.Using the -trace option is not required, but may assist in detecting any problems. See Starting the Multicast Daemon for more information.
3. On each node receiving multicast data, open a command line window and navigate to the TIBCO_HOME/ems/8.1/samples/java folder:
4. Launch the tibjmsPerfSlave sample program included with EMS:> java tibjmsPerfSlave -server serverURLIt is very important to run the jmsPerfSlave application on every node that will receive multicast data. EMS Multicast must be tuned to perform at the level of the slowest receiver, or congestion and loss can occur.When the trace messages indicate that multicast channels have exceeded their bandwidth, this indicates that the channel maxrate is too low—your publisher is publishing faster than the channel’s maxrate allows. On the other hand, when the maxrate is too high, you will see errors indicating that loss is detected.Depending on what the trace messages show, try adjusting the maximum rate of the channel (the maxrate property) up or down, and repeat this test.One key to a successful multicast deployment is ensuring that the EMS server does not overrun your applications with data. This frequently this means setting the delivery rates (the channel's maxrate property) to a rate below what your network and EMS alone can handle.
The channel’s maximum delivery rate, or maxrate, should not exceed the rate at which the slowest message consumer can consume incoming messages.If a multicast-enabled consumer is expected to fall behind at times and can sustain loss, you can account for this using the maxbytes and maxmsgs properties for topics. See Destination Properties for details about these properties.Once you have determined network capabilities and multicast receiver rates, you can experiment with increasing (or sometimes decreasing) channel maxrate properties to achieve maximum throughput. Finding the maximum multicast rate your environment can handle often requires more experimentation than anything else. Always remember that once the network has been saturated, throughput will drastically drop.For example, on Linux one can modify window sizes in the /etc/sysctl.conf file:
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |