Chapter 34. Tigase Load Balancing

Table of Contents

Available Implementations
Configuration Options

Wojciech Kapcia <wojciech.kapcia@tigase.org> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2013-06-10 15:49

Starting with version 5.2.0 Tigase introduces a load balancing functionality allowing users to be redirected to the most suitable cluster node. Functionality relies on a see-other-host XMPP stream error message. Basic principle behind the mechanism is that user will get redirect if the host returned by the implementaion differ from the host to which user currently tries to connect. It is required that the user JID to be known for the redirection to work correctly.

Available Implementations

Tigase implementation is, as usual, extensible and allows for different, pluggable redirection strategies that implement SeeOtherHostIfc interface.

Currently there are three strategies available:

  • SeeOtherHost - most basic implementation returning either single host configured in init.properties file or name of the current host;
  • SeeOtherHostHashed (default) - default implementation for cluster environment of SeeOtherHostIfc returning redirect host based on the hash value of the user’s JID; list of the available nodes from which selection would be made is by default composed and reflects all connected nodes, alternatively hosts list can be configured in the init.properties;
  • SeeOtherHostDB - extended implementation of SeeOtherHost using redirect information from database in the form of pairs user_id and node_id to which given user should be redirected.