|
tnsManager - Configuring for high availability
Running multiple instances of tnsManager
The Oracle client can be configured to use multiple LDAP names servers. This enables a degree of protection against hardware or network failure.
Install tnsManager onto two or more servers, and then add the additional host details to your client PCs ldap.ora file:
DIRECTORY_SERVERS = (server1:3838, server2:3838)
If server1 were to fail now, server2 would resolve the service name.
There is one slight problem though; if server1 becomes completely un-contactable, the client PC will wait for the operating systems default TCP timeout period to expire before moving onto the next server (20 seconds on windows, up to 2 minutes UNIX). For this reason, it is recommended that the tnsManager servers be given DNS aliases, and for these aliases to be re-pointed in the event of a prolonged server failure.
Load balancing switches - HTTP Alive web page
Note. This option requires tnsManager v1.8.0 or later.
If you decide to put multiple instances of tnsManager behind a load-balancing switch, the switch will probably require a method of determining if tnsManager is running. tnsManager has the ability to serve an 'alive' web page. This functionality is disabled by default. To enable it add the following line to the configuration file and restart tnsManager:
http_alive_page_enabled=true
Test it by pointing a web browser at the following URL:
http://<your server name>:3838/alive.html
You should see something similar to this:
Configure your network switch to periodically test this URL.
Replication between multiple tnsManager instances
Note. Replicaion requires tnsManager v1.7.6 or later.
If more than one instance of tnsManager is installed at a site, it is possible to link them together to enable the tnsnames to be automatically synchronised. This saves the effort of having to manually transfer and reload the tnsnames, and it also removes the possibility of differences occurring between servers.
To configure tnsManager for automatic tnsnames replication, first choose one instance to become the master instance. The other instance or instances will become targets. Any changes that are made to the master's tnsnames will be automatically pushed to the targets and loaded.
Add the following line to the master tnsManagers configuration file:
replication_target=<hostname:port>,<hostname:port>
List all target tnsManager servers including the port number. The maximum number of targets allowed is ten.
The target tnsManager instances also need to be told the name and port of the master instance. Do this by adding the following setting to their configuration file(s):
replication_master=<hostname:port>
A target instance can have one and only one master server.
Note. A tnsManager instance cannot be both a master and a target, so use only one of the above settings on each server.
For security, the master will only send replication data to the defined target instances and the targets will only accept data from the defined master instance. Data is encrypted during transmission.
Note. If hosts_allow is in use, the IP addresses of the target/master servers will need to be added to it.
Restart the master and target instances to load the new settings. From now on, whenever the master instance is reloaded or started, each target tnsnames will be checked. If any are found to differ from the master copy, a new one will be transmitted to the target. The targets will also ask to be checked by the master whenever they are restarted or reloaded.
To test the settings, make an alteration to the master instances tnsnames file, then run the following command:
tnsManager reload
Wait a few seconds then check the target instance using the status command:
tnsManager status
The modification time, size and number of entries should match. The physical tnsnames file will also have been updated. If the tnsnames does not get updated, check the logs for more information.
Example configuration
Master server
Hostname: Red
Port: 3838
replication_target=green:3838, blue:3838
Target server 1
Hostname: Green
Port: 3838
replication_master=red:3838
Target server 2
Hostname: Blue
Port: 3838
replication_master=red:3838
<< Back
|
|
|