Adding MDEX Engine servers

You can add additional MDEX Engine servers to your environment by adjusting the Deployment Template AppConfig.xml file.

When you initially run the Deployment Template, it sets up an environment in which two Dgraphs are running on the same MDEX Engine server. You can optionally change this configuration and add one or more MDEX Engine servers, with one or more Dgraphs.

To add MDEX Engine servers:

  1. Adjust the [appDir]/config/script/AppConfig.xml file and add MDEX_Server2.MyCompany.com as shown in the following example.
    <!--
        ########################################################################
        # Servers/hosts
        ...
      -->
      <host id="ITLHost" hostName="PlatformServicesServer.MyCompany.com" port="8888" />
      <host id="MDEXHost1" hostName="MDEXServer1.MyCompany.com" port="8888" />
      <host id="MDEXHost2" hostName="MDEXServer2.MyCompany.com" port="8888" />
      <host id="webstudio" hostName="ToolsServer.MyCompany.com" port="8888"/ >
        <directories>
          <directory name="webstudio-report-dir">./reports</directory>
        </directories>
      </host>
    ...
    
  2. Add the Dgraph to the Dgraph cluster:
    <!--
        ########################################################################
        # Dgraph Cluster
        #
      -->
      <dgraph-cluster id="DgraphCluster" getDataInParallel="true">
        <dgraph ref="Dgraph1" />
        <dgraph ref="Dgraph2" />
      </dgraph-cluster>
    
      ....
    
  3. Point the Dgraph to the new host:
    <!--
        ########################################################################
        # Dgraphs
        #
      -->
      <dgraph id="Dgraph1" host-id="MDEXHost1" port="15000">
       ....
      </dgraph>
    
      <dgraph id="Dgraph2" host-id="MDEXHost2" port="15001">
       ....
      </dgraph>
    
    ....

Example

In this example, an additional MDEX Engine server is specified, <host id="MDEXHost2" hostName="MDEXServer2.MyCompany.com" port="8888" />.

In addition, Dgraph2 is now pointing to MDEXHost2, as in: <dgraph id="Dgraph2" host-id="MDEXHost2" port="15001">.

In this configuration Dgraph1 runs on MDEXServer1.MyCompany.com and Dgraph2 runs on MDEXServer2.MyCompany.com.

Note: The ports specified in the MDEXHost1 and MDEXHost2 definitions are the ports on which the EAC Agent is running on those machines, not the MDEX Engine query ports.
This example shows an abbreviated version of the file and highlights the required changes:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ##########################################################################
  # This file contains settings for an EAC application.
  ...
    ########################################################################
    # Global variables
    #
  -->
  <app appName="MyApp" eacHost="PlatformServicesServer.MyCompany.com" eacPort="8888" 
  ...
  </app>

  <!--
    ########################################################################
    # Servers/hosts
    ...
  -->
  <host id="ITLHost" hostName="PlatformServicesServer.MyCompany.com" port="8888" />
  <host id="MDEXHost1" hostName="MDEXServer1.MyCompany.com" port="8888" />
  <host id="MDEXHost2" hostName="MDEXServer2.MyCompany.com" port="8888" />
  <host id="webstudio" hostName="ToolsServer.MyCompany.com" port="8888" />
    <directories>
      <directory name="webstudio-report-dir">./reports</directory>
    </directories>
  </host>
...

  <!--
    ########################################################################
    # Dgraph Cluster
    #
  -->
  <dgraph-cluster id="DgraphCluster" getDataInParallel="true">
    <dgraph ref="Dgraph1" />
    <dgraph ref="Dgraph2" />
  </dgraph-cluster>

  ....

  <!--
    ########################################################################
    # Dgraphs
    #
  -->
  <dgraph id="Dgraph1" host-id="MDEXHost1" port="15000">
   ....
  </dgraph>

  <dgraph id="Dgraph2" host-id="MDEXHost2" port="15001">
   ....
  </dgraph>

....
  

Now that you have added an additional MDEX Engine server, you can add an additional Dgraph on any of these servers.