Configuring Magic xpa Partitioning Components to Use IP Addresses (Magic xpa 3.x)
This topic is only relevant when using the broker as a middleware.
This Technical Note explains how to configure all of the Magic xpa partitioning components (Broker, Requester and Magic xpa engine) to use IP addresses instead of using hostnames.
There are three components involved in a Magic xpa / Partitioning environment:
Broker – in most cases, the MgBroker.exe file, located in the Magic xpa directory.
This component (executed either as a Service or as an executable) is configured using the mgrb.ini file (located in the Magic xpa directory).
Requester – could be either the MGrqispi.dll or MGrqcgi.exe file, located either in the Magic xpa directory or in the Scripts subdirectory, configured using the mgreq.ini file located next to the file.
Engine – the Magic xpa exe file (MgxpaStudio or MgxpaRuntime) configured using the Magic.ini file (or any other ini file specified in the shortcut).
In most installations, the default values are used. In such cases, the connection between these three components is done via a TCP/IP network protocol using hostname resolving (no hostname / IP addresses are specified).
Such a situation could cause several phenomena:
Slow performance between the components – This is caused by the fact that each request triggers a hostname resolving mechanism, which translates a hostname to an IP address. This process takes time and resources (both from the Magic xpa components and from the other servers in the network such as the DNS server).
Errors – There are several low level TCP/IP error codes that basically indicate that there is a hostname resolving problem (caused by various reasons).
To eliminate such problems, you can configure the Magic xpa components to use IP addresses instead of hostnames.
The changes that you need to make are as follows:
Mgrbi.ini - on the machine that runs the Magic Broker set:
BrokerPort=<broker ip>/<broker port>
(e.g BrokerPort = 10.0.0.140/3300)
You must restart the broker after saving the ini.
Mgreq.ini (for Web - in the scripts directory, for partitioning – Magic xpa directory)
MessagingServer=<broker ip>/<broker port>
You must restart the webserver (web) after saving the ini.
MAGIC.INI – modify the ini of each engine:
Default Broker = 0, <broker ip>/<broker port>,,<broker_pass>,10,,1
(e.g Default Broker = 0, 10.0.0.140/3300,,myPass,10,,1)
TCP/IP = 2, 30, 1500-2000 /LocalHost=<engine ip>
(e.g TCP/IP = 2, 30, 1500-2000 /LocalHost=10.0.0.140)
The LocalHost (case sensitive) settings, control how the Magic xpa engine is identified and should be set to the IP of the machine that executes the engine. There must be a space between the 1500-2000 and /LocalHost.
You must restart the engine after saving the ini.