Configure the site search factor
Read this first
Before attempting to configure the site search factor, you must be familiar with:
- The basic, single-site search factor. See "The basics of cluster architecture" and "Search factor".
- The site replication factor. See "Configure the site replication factor".
- Multisite cluster configurations. See "Configure multisite indexer clusters with server.conf".
What is a site search factor?
To implement multisite indexer clustering, you must configure a site search factor. This replaces the standard search factor, which is specific to single-site deployments. You specify the site search factor on the master node, as part of the basic configuration of the cluster.
The site search factor provides site-level control over the location of searchable bucket copies, in addition to providing control over the total number of searchable copies across the entire cluster. For example, you can specify that a two-site cluster maintain a total of three searchable copies of all buckets, with one site maintaining two copies and the second site maintaining one copy.
You can also specify a search policy based on which site originates the bucket. That is, you can configure the search factor so that a site receiving external data maintains a greater number of searchable copies of buckets for that data than for data that it does not originate. For example, you can specify that each site maintains two searchable copies of all data that it originates but only one copy of data originating on another site.
The site search factor helps determine whether the cluster has search affinity. See "Implement search affinity in a multisite indexer cluster".
The syntax for
site_replication_factor are identical, except for the additional requirement that the values and explicit sites in
site_search_factor be a subset of those in
site_replication_factor. This section describes the syntax in full detail.
You configure the site search factor with the
site_search_factor attribute in the master's server.conf file. The attribute resides in the
[clustering] stanza, in place of the single-site
search_factor attribute. For example:
[clustering] mode = master multisite=true available_sites=site1,site2 site_replication_factor = origin:2,total:3 site_search_factor = origin:1,total:2
You can also use the CLI to configure the site search factor. See "Configure multisite indexer clusters with the CLI".
Warning: You must configure the
site_search_factor attribute correctly. Otherwise, the master will not start.
Here is the formal syntax:
site_search_factor = origin:<n>, [site1:<n>,] [site2:<n>,] ..., total:<n>
<n>is a positive integer indicating the number of searchable copies of a bucket.
origin:<n>specifies the minimum number of searchable copies of a bucket that will be held on the site originating the data in that bucket (that is, the site where the data first entered the cluster). When a site is originating the data, it is known as the "origin" site.
site1:<n>, site2:<n>, ...,indicates the minimum number of searchable copies that will be held at each specified site. The identifiers "site1", "site2", and so on, are the same as the
siteattribute values specified on the peer nodes.
total:<n>specifies the total number of searchable copies of each bucket, across all sites in the cluster.
Note the following:
- This attribute specifies the per-site searchable copy policy. It is specified globally and applies to all buckets in all indexes.
- This attribute is valid only if
multisite=true. Under those conditions, it supersedes any
totalvalues are required.
- Site values (
site1:<n>, site2:<n>, ...) are optional. A site that is specified here is known as an "explicit" site. A site that is not specified is known as a "non-explicit" site.
- To determine the minimum number of searchable copies a site gets, use the same rules as for determining the minimum number of replicated copies a site gets through
site_replication_factor. See "Configure the site replication factor".
- To determine the minimum required value for
total, use the same rules as for determining the minimum
totalvalue for the
site_replication_factor. See "Configure the site replication factor".
- Because the
totalvalue can be greater than the total set of explicit values, the cluster needs a strategy to handle any "remainder" searchable bucket copies. The strategy follows the strategy for remainder replicated copies, described in "Configure the site replication factor".
- All values must be less than or equal to their corresponding values in the
For example, if you have a three-site cluster with "site_replication_factor = origin:2, site1:1, site2:2, total:5", then, in
originvalue cannot exceed 2, the
site1value cannot exceed 1, the
site2value cannot exceed 2, and the
totalvalue cannot exceed 5.
- If a site value is explicit in
site_search_factor, it must also be explicit in
site_replication_factor. However, an explicit site value in
site_replication_factordoes not need be explicit in
For example, if you have a three-site cluster with "site_replication_factor = origin:2, site1:1, site2:2, total:5" (with a non-explicit site3), you can specify "site_search_factor = origin:1, site2:2, total:4" (removing the explicit site1), but you cannot specify "site_search_factor = origin:1, site1:1, site2:2, site3:1, total:4" (making the non-explicit site3 explicit).
- For search affinity, you must configure the
site_search_factorso that you have at least one searchable copy on each site where you require search affinity. Only explicit sites adhere to search affinity.
- If you are migrating from a single-site cluster, the
totalvalue must be at least as large as the
search_factorfor the single-site cluster. See "Migrate an indexer cluster from single-site to multisite".
- The attribute defaults to: "origin:1, total:2."
For examples of site search factor syntax, refer to the examples in "Configure the site replication factor". The syntax for specifying origin/site/total values in
site_search_factor is identical to
Handle the persistence of the single-site search_factor
Important: Although the
site_search_factor effectively replaces the single-site
search_factor, the single-site attribute continues to exist in the master's configuration, with its default value of 2. This can cause problems on start-up if any site has only one peer node. The symptom will be a message that the multisite cluster does not meet its search factor. To avoid or fix this problem, you must set the single-site search factor to a value that is less than or equal to the smallest number of peers on any site. In the case where one site has only one peer, you must therefore explicitly set the
search_factor attribute to a value of 1. See "Multisite cluster does not meet its replication or search factors."
Configure the site replication factor
Migrate an indexer cluster from single-site to multisite
This documentation applies to the following versions of Splunk® Enterprise: 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.3.5, 6.3.6, 6.3.7, 6.3.8, 6.3.9, 6.3.10, 6.3.11, 6.3.12, 6.3.13, 6.3.14, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.10, 6.4.11, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9, 6.5.10, 6.6.0, 6.6.1, 6.6.2, 6.6.3, 6.6.4, 6.6.5, 6.6.6, 6.6.7, 6.6.8, 6.6.9, 6.6.10, 6.6.11, 6.6.12, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.6, 7.0.7, 7.0.8, 7.0.9, 7.0.10, 7.0.11, 7.0.13, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.1.10, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 7.2.10, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4