solidDB Help : Programming : Using HotStandby with applications : Connecting to HotStandby servers
  
Connecting to HotStandby servers
You can use two connection methods for your applications in HotStandby (HSB) environments, Basic Connectivity and Transparent Connectivity (TC). With Basic Connectivity, the client connects to each of the HSB servers explicitly. With TC, the client enacts only one logical connection that is called the TC connection.
Both connectivity types are supported in the solidDB ODBC and JDBC drivers, as well as with Shared Memory Access (SMA) servers. The connectivity type is defined by using a connect string. With Basic Connectivity, the standard solidDB connection syntax is used. With TC, a specific TC connection syntax is used.
Basic Connectivity
With Basic Connectivity, the application has to take care of connecting to each server in the HSB configuration separately, by using specific server addresses. If a failover happens, the active connection is lost, and the application has to reconnect to the new primary server.
Transparent Connectivity
With Transparent Connectivity, the application does not connect to a specific server, or reconnect to a specific server in the case of a failover. The application maintains a logical connection (handle) called a TC connection. In simple terms, the TC connection relieves the application from having to deal with a multiplicity of servers and their addresses.
The connection handle is maintained when there are failovers or switchovers as long as one of the servers in the HSB pair is in the PRIMARY ACTIVE, PRIMARY ALONE or STANDALONE state. During failovers and switchovers, the driver performs an internal operation called connection switch. The application is notified about the connection switch, because the application must reconstruct some of the session states (depending on the failure transparency level).
Transparent Connectivity with network-based connection
With network-based connections, the application and the servers can be located on the same or different computers.
Applications can use the load-balancing functionality to send read-only loads to the secondary server.
Transparent Connectivity with SMA connection
With SMA, there are two applications, one on each HSB server. The application on the primary server uses an SMA connection for reads and writes. The application on the secondary server uses an SMA connection to execute only local reads; write transactions from the application on the secondary server are executed on the primary server by using a network connection.
Server failovers and switchovers are handled in the same way as with network-based applications. However, if the application fails because the SMA server has failed, an application-specific high availability handling solution is needed.
Go up to
Using HotStandby with applications