Example: data domain profile with high hardware usage

This example illustrates the characteristics of a data domain profile that defines a production-grade data domain cluster. In such a cluster, each Dgraph node runs on a dedicated Endeca Server node, and a dedicated leader node handles only updating requests.

The data domain profile is defined with the dataDomainProfile complex type of the Cluster Web Service. This complex type is used when you specify a data domain profile to the Endeca Server, using the putDataDomainProfile operation of the Cluster Web Service. You can also use endeca-cmd put-dd-profile.

The following example of a production-grade data domain configuration ensures the following:
  • The Endeca Server machines host only that data domain, dedicate 100% of their CPU capacity to the data domain's nodes, and are not allowed to oversubscribe. This is accomplished by setting the value of numComputeThreads in the profile to the total number of CPU cores available on each Endeca Server node and setting the value of allowOversubscribe to false.
  • The follower nodes in the data domain cluster are dedicated to processing only non-updating, end-user query requests. This ensures that the leader node is dedicated to processing updating requests to the data and to the configuration. This behavior is defined by setting the allowQueriesOnLeader element in the data domain profile definition to false.

Example

This example illustrates the production-grade data domain profile. Because it represents a snippet of a full web service request, the example does not list the namespace of the Cluster Web Service or the operation used to define the profile.

The example specifies the number of Dgraph nodes as 10 and the number of threads requested for each Dgraph node as 4. These numbers are arbitrary — you can modify them according to the needs of your data domain cluster and the overall capacity of nodes in the Endeca Server cluster. In this example, these numbers imply that the data domain will be hosted by ten Endeca Server nodes, each of which has at least 4 CPUs.

The important parts of this example are the settings for allowQueriesOnLeader and allowOversubscribe, which are both set to false, and the setting for numComputeThreads, which is equal to the number of CPUs on each Endeca Server node:
<dataDomainProfile>
    <name>high hardware-usage profile</name>
    <description>Production data domain profile</description>
    <allowQueriesOnLeader>false</allowQueriesOnLeader>
    <numFollowers>10</numFollowers>
    <readOnly>false</readOnly>
    <allowOversubscribe>false</allowOversubscribe>
    <numComputeThreads>4</numComputeThreads>
    <computeCacheSizeMB>1</computeCacheSizeMB>
    <startupTimeoutSeconds>600</startupTimeoutSeconds>
    <shutdownTimeoutSeconds>30</shutdownTimeoutSeconds>
    <sessionIdType>header</sessionIdType>
    <sessionIdKey>X-Endeca-Session-ID</sessionIdKey>
</dataDomainProfile>