Show Table of Contents
Chapter 2. Multiple Hosts
2.1. Using Multiple Hosts
JBoss Data Virtualization may be clustered over several servers utilizing failover and load balancing.
The easiest way to enable these features is for the client to specify multiple hostname and port number combinations in the URL connection string as a comma separated list of
host:port combinations:
jdbc:teiid:<vdb-name>@mm://host1:31000,host1:31001,host2:31000;version=2
If you are connecting with the data source class, the
setAlternateServers method can be used to specify the failover servers. The format is also a comma separated list of host:port combinations.
The client randomly selects one of the JBoss Data Virtualization servers from the list and establishes a session with that server. If a connection cannot be established, then each of the remaining servers will be tried in random order. This allows for both connection time failover and random server selection load balancing.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.