guides:oecgi4:configuring_failover_and_load_balancing

Configuring Failover and Load Balancing

OECGI4 supports Failover and Load Balancing modes. These modes make OECGI4 a more robust connection object and allows for extra capacity and/or redundancy to be added to a web application.

A new OECGI4 registry setting, MultipleServers, controls whether OECGI4 operates in Failover or Load Balancing Mode.

MultipleServers=0Failover Mode
MultipleServers=1Load Balancing Mode

You enter multiple ServerURL’s and ServerPort’s into the ServerURL and ServerPort settings comma delimited:

E.G.

ServerURL192.168.0.1,192.168.0.2,192.168.0.3
ServerPort18088,18088,18089

Please note that you must specify the same number of ServerURL and ServerPort values; that is, if you have 3 comma-delimited ServerURL values, you must have 3 comma-delimited ServerPort values.

Each of the servers listed above in the example would need to have the OEngineServer Service installed and running.

UNICODE��L�E�A�D� �T�e�c�h�n�o�l�o�g�i�e�s� �I�n�c�.� �V�1�.�0�1

Figure 50 - Multiple servers registry settings

Failover Mode

In Failover mode, you supply OECGI4 with a list of ServerURL’s and ServerPort’s that are available. OECGI4 attempts to connect to the first serverURL/ServerPort in the list. If the connection is unsuccessful then OECGI4 will continue on to the next ServerURL/ServerPort in the list until a successful connection is made. If all connection attempts fail, then the SYSDOWNPAGE page is returned.

Example

Given the following settings:

ServerURL: 192.168.1.1,192.168.1.2,192.168.1.3

ServerPort:18088,18088,18089

MultipleServers:0

Any request to the OECGI4.EXE will attempt to connect to 192.168.1.1/18088. If for some reason it can’t open that port, OECGI4 will attempt to connect to 192.168.1.2/18088; if still no success, then 192.168.1.3/18089 will be tried. If the connection still fails, OECGI4 will return an error (or the SysDownPage). On the next request, OECGI4 starts again at 192.168.1.1/18088.

Load Balancing Mode

In Load Balancing Mode, you supply OECGI4 with a list of ServerURL’s and ServerPort’s that are available. OECGI4 will randomly choose a ServerURL/ServerPort from the list available, and then attempt to connect to that server. If the connection fails, OECGI4 will move to the next ServerURL/ServerPort in the list, “looping” through the list until its back at the originally selected URL/Port combination, at which point OECGI4 will return the SYSDOWNPAGE page.

Example

Given the following settings:

ServerURL: 192.168.1.1,192.168.1.2,192.168.1.3

ServerPort:18088,18088,18089

MultipleServers:1

Requests to OECGI4.EXE will attempt to connect to any of the three hosts 192.168.1.1/18088, 192.168.1.2/18088, or 192.168.1. 3/18089 with (roughly) equal chance. Say OECGI4.EXE decides to try to connect to 192.168.1.1/18088, and it fails, it will then try 192.168.1. 2/18088, and then 192.168.1.3/18089, before giving up. Notice how OECGI4 loops though all possible connections.

  • guides/oecgi4/configuring_failover_and_load_balancing.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1