Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 7 Distributed Cache OM : Load Balancing

Load Balancing
Load balancing is available for messages arriving from queues. Do not use load balancing for subject-based or other broadcast sources.
Two kinds of load balancing configuration are available: basic load balancing and content-aware load balancing. They support messages arriving from TIBCO Enterprise Message Service queue sources.
Every JMS destination that is configured to be an input destination runs in its own JMS Session. This provides good throughput on queues and topics for processing, and less connections.
Basic Load Balancing
Events from queue sources are automatically distributed between instances of an agent class. To set up this kind of load balancing, you simply deploy multiple instances of an agent class, where each agent runs in a different processing unit.
Certain aspects of the design have to be managed by the application. See Designing for Concurrency for related information.
This method can be useful when there is no relationship between the events that would require them to be processed in a certain order. If the order or grouping of events received is important, use content-aware load balancing. Content-aware load balancing has other benefits also, as explained below.
Content-aware Load Balancing
With content-aware load balancing, all related events arriving from queues are routed to the same agent. The events arriving at a destination are related by a routing key, which uses the value of a selected event property. For example, if the event property values are zip codes, then all messages relating to one zip code are routed (over TCP) to the same receiver agent, providing “session stickiness.”
Use of content-aware load balancing simplifies project configuration, and makes runtime behavior more efficient. For example, only local locking is generally required (whereas basic load balancing requires cluster-wide locking). Also the L1 cache does not have to be checked for version consistency.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved