此内容没有您所选择的语言版本。
Chapter 3. Multiple Hosts
3.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
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.